This is often a Bad Idea, as you get unstable sorts and you are right back to the same problem.
- Explanation: How do I get the minimum or maximum value of an iterator containing floating point numbers? — https://stackoverflow.com/a/50308360/155423
- Example: https://play.integer32.com/?version=stable&mode=debug&editio...
See also:
- How to do a binary search on a Vec of floats? — https://stackoverflow.com/q/28247990/155423
Instead, use a wrapper type or raise a panic.