Function decorum::cmp_float [] [src]

pub fn cmp_float<T>(lhs: T, rhs: T) -> Ordering where
    T: Float + Primitive, 

Compares primitive floating-point values.

To perform the comparison, the floating-point value is canonicalized. If NaN or zero, a canonical form is used (CNaN and C0 respectively) so that all NaNs and zeroes (positive and negative) are considered equal.

The total ordering is: [-INF | ... | C0 | ... | INF | CNaN ].