mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 19:41:56 +00:00
* Fixes floating point inaccuracies in numeric preferences (#74384) ## About The Pull Request Floating point inaccuracy fun. Since it's possible to have a `minimum`,`maximum`, and `step` that are floats we need to round everything to `step` to ensure the comparison operations work. If we do not do this, there is no guarantee that `if(min <= number && number <= max)` will work correctly. For example, in the linked issues, this manifested as the minimum value (0.8) being considered invalid when the input was also 0.8. Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/9507 Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/14394 ## Why It's Good For The Game Fixes an obscure bug that has gone unnoticed for a couple years. ## Changelog 🆑 fix: fixes floating point inaccuracies in numeric prefs /🆑 * Fixes floating point inaccuracies in numeric preferences --------- Co-authored-by: Bloop <vinylspiders@gmail.com>