Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix floating point arithmetic error #4795

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

tgex0
Copy link
Contributor

@tgex0 tgex0 commented Sep 11, 2024

Description

Fixes root cause of this crash: #4663 (comment)
Floating point arithmetic rounding causes error in comparison when checking a UI slider's range/steps.

Crash was avoided by changing lower range of slider to 0.3f but using a value of 0.2f causes the app to crash.
Changing a different slider's range value could potentially cause a similar crash in the future so fixing the root cause of the problem is necessary.

Type of change

❌ General change (non-breaking change that doesn't fit the below categories like copyediting)
✅ Bug fix (non-breaking change which fixes an issue)
❌ New feature (non-breaking change which adds functionality)
❌ Breaking change (fix or feature that would cause existing functionality to not work as expected)

@tgex0
Copy link
Contributor Author

tgex0 commented Sep 12, 2024

Done!

@Goooler Goooler merged commit 419304a into LawnchairLauncher:14-dev Sep 14, 2024
5 checks passed
@tgex0 tgex0 deleted the Floating_Point_Error branch September 14, 2024 09:54
nulldrf pushed a commit to nulldrf/lawnchair that referenced this pull request Sep 19, 2024
* Fix floating point arithmetic error

* Change variable name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants