add the ability to disable mapToScale rounding (precision=false)

This commit is contained in:
jean-emmanuel 2016-05-16 12:08:27 +02:00
parent 0ccdccaab6
commit f4238e95da

View file

@ -27,7 +27,7 @@ module.exports = {
value = Math.max(Math.min(rangeOut[0],rangeOut[1]),Math.min(value,Math.max(rangeOut[0],rangeOut[1])))
value = Math.round(value*roundFactor)/roundFactor
if (precision!==false) value = Math.round(value*roundFactor)/roundFactor
return value