Opened 5 years ago

Last modified 2 years ago

#15262 new bug

Slider max rounded down

Reported by: Jason Grout Owned by:
Priority: minor Milestone: none
Component: ui.slider Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:


In #12852, an issue with floating point roundoff in the slider was fixed.

This new logic still has a problem with the range (0.0, 0.6) and step 0.1: 0.6 is not reachable in this case - the slider only goes up to 0.5.

Perhaps instead of subtracting a step from max, we could build in the knowledge that the last step may not be a full step and keep the user-set maximum (since that's what the user intended, since it was explicitly set).

Change History (2)

comment:1 Changed 4 years ago by Scott González

Component: ui.coreui.slider

comment:2 Changed 2 years ago by Tatyana Kiseleva

Created PR with fix There is one test case that failed, but I'm not sure that it's the correct one.

The initial issue happens when in the setting I've set 8.003, but in js, it received as 8.0029999...

Note: See TracTickets for help on using tickets.