pub fn gcd(a: usize, b: usize) -> usize
The greatest common divisor of a and b (Euclid’s algorithm; gcd(a, 0) = a).
a
b
gcd(a, 0) = a
use comnum_math::gcd; assert_eq!(gcd(255, 11), 1); assert_eq!(gcd(0, 7), 7);