float_ordFunction sort
source pub fn sort<T>(v: &mut [T])
Expand description
Sort a slice of floats.
§Allocation behavior
This routine uses a quicksort implementation that does not heap allocate.
§Example
let mut v = [-5.0, 4.0, 1.0, -3.0, 2.0];
float_ord::sort(&mut v);
assert!(v == [-5.0, -3.0, 1.0, 2.0, 4.0]);