We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We likely have a lot of code that assumes floating point conversion to integer rounding toward negative infinity, while in fact it rounds toward 0.
#622 (comment)
The text was updated successfully, but these errors were encountered:
@LBPHacker wait i thought i mentioned this before. I didn't? Oops. Well now it's an issue, so that helps.
The +0.5f trick is slightly faster, so when negative numbers are impossible using it should be fine. Maybe make it into a function, i.e.
int fast_nonneg_toint(float)
or similar, so that the safe usages of it are more obvious.
Sorry, something went wrong.
No branches or pull requests
We likely have a lot of code that assumes floating point conversion to integer rounding toward negative infinity, while in fact it rounds toward 0.
The text was updated successfully, but these errors were encountered: