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

add cmp() to f32 and f64, with tests #12193

Closed
wants to merge 1 commit into from

Commits on Feb 11, 2014

  1. add cmp() to f32 and f64, with tests

    Sometimes, it becomes necessary to find out if one of your floats is
    bigger or smaller than another one of your floats. In my case, I had a
    list of floats I had calculated, and I wanted to sort them biggest to
    smallest. Using `sort_by()` requires cmp, so I initially wrote my own
    fcmp, and then realized that was silly and it should just be built in.
    indirect committed Feb 11, 2014
    Configuration menu
    Copy the full SHA
    1fe74c6 View commit details
    Browse the repository at this point in the history