Function float_ord::sort [] [src]

pub fn sort<T>(v: &mut [T]) where
    FloatOrd<T>: Ord

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]);