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

Use std::floor instead of casting double -> int -> double #1026

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

guitargeek
Copy link
Contributor

This is the correct way to round down floating point numbers:

https://en.cppreference.com/w/cpp/numeric/math/floor

Closes #945.

@anigamova anigamova merged commit 865a330 into cms-analysis:main Nov 21, 2024
8 checks passed
@guitargeek guitargeek deleted the issue-945 branch November 21, 2024 16:17
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.

Double to int casting can cause precision issues
2 participants