Function decorum::cmp_float

source ·
pub fn cmp_float<T>(lhs: T, rhs: T) -> Orderingwhere
    T: Float + Primitive,
Expand description

Compares primitive floating-point values.

To perform the comparison, the floating-point values are interpretted in canonicalized form. All NaNs and zeroes (positive and negative) are considered equal to each other.

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