Small change for slider's numDecimalPlaces?


#1

hi jules,


in Slider::setRange, would you be ok to change :

int v = abs ((int) (newInt * 10000000));

to that :

int v = abs (roundToInt (newInt * 10000000));

cause the actual cast does not work properly in some basic cases :
weirdly, if newInt is 0.01, then the cast leads to v=99999 which leads to numDecimalPlaces being 7..


#2

Good call, thanks!