Function utils::number::lcm

source ·
pub fn lcm<T: SignedInteger>(a: T, b: T) -> T
Expand description

Computes the lowest common multiple (LCM).

§Examples

assert_eq!(lcm(6, 4), 12);
assert_eq!(lcm(21, 6), 42);