Sliders: replace Into<f64> with AsPrimitive<f64> - #3260
Conversation
4fe0960 to
b1eeaed
Compare
|
Although on second thought, I'm not sure we want to pretend that |
Yeah this was a thought I had as well, I think it might be worth mentioning in the docs that it uses conversions to/from f64 internally so it can represent up to 52(iirc) bits losslessly and the rest is imprecise? From what I can tell if you have multiple ways to control the same value the slider will not overwrite it's value if you have another way to change it. In my case I have a +/- 1 button and. a text entry box which is based on the true value. I'm not around tonight but I'm happy to add this to the relevant docs if you think it's a good idea. |
Head branch was pushed to by a user without write access
6af2f1d to
3cb23f3
Compare
|
Took me a hot minute to get round to this but I've added a note to the docs for both mentioning the limitiation and the fact that if you are using any large u? to their limits f64 is not what is stopping you from achieving precision, its the fact you are using a slider lol. Happy to amend the wording ofc |
This change is intended to allow the Slider and VerticalSlider structs to work with larger integer types such as u64 and usize.
3cb23f3 to
e323eda
Compare
This change is intended to allow the Slider and VerticalSlider structs to work with larger integer types such as u64 and usize.
I had a use case for this on a personal project and @edwloef suggested the change on the discord so I've put up this PR for it.