Closed sjpt closed 5 years ago
Small numbers format as 0 in slider boxes. Replace roundToDecimal with something like:
function roundToDecimal(value, decimals) { if (Math.abs(value) < 0.01 && value !== 0) return value.toExponential(3); var tenTo = Math.pow(10, decimals); return Math.round(value * tenTo) / tenTo; }
n.b. do NOT use value.toExponential(decimals)
Small numbers format as 0 in slider boxes. Replace roundToDecimal with something like:
n.b. do NOT use value.toExponential(decimals)