material icon indicating copy to clipboard operation
material copied to clipboard

mdSlider if set step="0.1", when slide the slider it's value will be a long float number

Open luozhihua opened this issue 11 years ago • 1 comments

<md-slider flex min="0" max="20" step="0.1" md-discrete
                  ng-model="component.animation.duration"
                  aria-label="transition-duretion" id="duration-slider">
</md-slider>

<md-input-container flex>
    <input type="number" min="0" max="20" step="0.1" ng-model="component.animation.duration" aria-label="transition-duretion" aria-controls="duration-slider">
</md-input-container>

When I slide the slider, it's value will be a long float number like those: 14.700000000000001, 0.7000000000000001, 1.7000000000000002

luozhihua avatar Mar 24 '15 04:03 luozhihua

We're seeing this as well with 0.05 step increments. Glad to see that a PR is already in progress. Thank you!

mprentic-harris avatar Jun 02 '15 22:06 mprentic-harris