cmp_f64_nan_last

Function cmp_f64_nan_last 

Source
pub fn cmp_f64_nan_last(a: f64, b: f64) -> Ordering
Expand description

Ascending order of a and b, with NaN after every number.

Use it as xs.sort_by(|a, b| cmp_f64_nan_last(*a, *b)). A descending sort that swaps the arguments therefore puts NaN first.