Lcm

Trait Lcm 

Source
pub trait Lcm<T = Self> {
    type Output;

    // Required method
    fn lcm(&self, other: T) -> Self::Output;
}
Expand description

Is implemented by Z instances to compute the lcm.

Required Associated Types§

Required Methods§

Source

fn lcm(&self, other: T) -> Self::Output

Outputs the least common multiple (lcm) of the two given values with lcm(a, 0) = 0.

Parameters:

  • other: specifies one of the values of which the lcm is computed

Returns the least common multiple of self and other as a new value.

Implementors§

Source§

impl<Integer: Into<Z>> Lcm<Integer> for Z