gcd

Function gcd 

Source
pub fn gcd<T: Integer>(a: T, b: T) -> T
Expand description

Computes the greatest common divisor (GCD) using the Euclidean algorithm.

ยงExamples

assert_eq!(gcd(252, 105), 21);
assert_eq!(gcd(-12, 8), -4);