Trait AbsMod

Source
pub trait AbsMod<Rhs = Self> {
    type Output;

    // Required method
    fn absmod(&self, rhs: Rhs) -> Self::Output;
}
Expand description

This trait further generalizes PyMod by returning the absolute value of the result; dropping all signs in the process. This method is particularly useful when working in environments where the magnitude of the result is more important than the sign.

§Example

Required Associated Types§

Required Methods§

Source

fn absmod(&self, rhs: Rhs) -> Self::Output

Implementors§

Source§

impl<A, B, C> AbsMod<B> for A
where A: Copy + Add<C, Output = C> + Rem<B, Output = C>, B: Copy, C: Add<B, Output = C> + Rem<B, Output = C> + Signed,