pub trait Abs: Neg<Output = Self> + Ord + Zero { fn abs(self) -> Self { ... } }
Absolute value of a number.
Automatically implemented for all types satisfying the trait’s bounds.
The absolute value of a number.
Compute the additive inverse if the number is smaller than the additive identity.