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

Stop using INT_MIN/INT_MAX for floats #2094

Merged
merged 1 commit into from
Aug 17, 2023
Merged

Commits on Aug 12, 2023

  1. Stop using INT_MIN/INT_MAX for floats

    INT_MIN/INT_MAX are meant for the int type, and thus casting them to a
    different type (float) means loss of precision which may lead to failed
    comparisons later on.
    
    Instead use the proper limits using std::numeric_limits.
    pinotree committed Aug 12, 2023
    Configuration menu
    Copy the full SHA
    626fdeb View commit details
    Browse the repository at this point in the history