Trait Abs
Other items inrelp_num
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.
fn abs(self) -> Self
The absolute value of a number.
Compute the additive inverse if the number is smaller than the additive identity.
impl<T: Neg<Output = Self> + Ord + Zero> Abs for T