rgb: do not round value (#252)

This commit is contained in:
jean-emmanuel 2019-01-22 19:04:35 +01:00
parent f990a05cd4
commit ea85169b39
2 changed files with 3 additions and 1 deletions

View file

@ -2,6 +2,8 @@
## 0.41.3
- bug fixes
- `rgb`: values were rounded even with `precision` different from `0`
- osc
- add support for utf8 string argments (encoded/decoded as per standard https://encoding.spec.whatwg.org/#utf-8)

View file

@ -141,7 +141,7 @@ module.exports = class Rgb extends Pad {
var rgb = hsbToRgb(this.hsb)
for (var k in rgb) {
rgb[k] = mapToScale(rgb[k], [0, 255], [this.getProp('range').min, this.getProp('range').max])
rgb[k] = mapToScale(rgb[k], [0, 255], [this.getProp('range').min, this.getProp('range').max], false)
}
if (rgb.r != this.value[0] || rgb.g != this.value[1] || rgb.b != this.value[2]) {