pub trait Gcd<Rhs = Self> {
    type Output;

    fn gcd(self, rhs: Rhs) -> Self::Output;
}
Expand description

Compute the greatest common divisor

Example

use dashu_base::Gcd;
assert_eq!(12u8.gcd(10u8), 2);

Panics

Panics if two oprands are both zero.

Required Associated Types

Required Methods

Compute the greatest common divisor between the two operands.

Panics

Panics if both operands are zeros

Implementations on Foreign Types

Implementors