PolymerElements / iron-range-behavior

Managing a numeric value within a given range
8 stars 16 forks source link

Floating point issue when this.min is negative #22

Open zbury opened 8 years ago

zbury commented 8 years ago

I seem to be running into a rounding issue when this.min is negative.

A simple paper-slider element will reproduce this:

<paper-slider step=".2" min="-60" pin></paper-slider> https://jsbin.com/radipokecu/1/edit?html,output

Instead of rounding to the precision of step, the paper-slider gets values like -3.6000000000000014.

fl4p commented 7 years ago

I have a fix for this: https://github.com/PolymerElements/iron-range-behavior/pull/27