pub trait AbsOrd<Rhs = Self> {
// Required method
fn abs_cmp(&self, rhs: &Rhs) -> Ordering;
}Expand description
Compare the magnitude of this number to the magnitude of the other number
Note that this function will panic if either of the numbers is NaN.
§Examples
assert!(5.abs_cmp(&-6).is_le());
assert!(12.3.abs_cmp(&-12.3).is_eq());