Function decorum::eq_float

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

Determines if primitive floating-point values are equal.

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