src/NeinMath/IntegerFunctions.cs
/// <summary>
/// Finds the greatest common divisor of two Integers.
/// </summary>
/// <param name="left">The first value.</param>
/// <param name="right">The second value.</param>
/// <returns>The greatest common divisor of left and right.</returns>
Finds the greatest common divisor of two Integers.
Finds the greatest common divisor of two Integers .
public static Integer Gcd(this Integer left, Integer right)
        {
            var a = Abs(left);
            var b = Abs(right);
            if (a < b)
                return Lehmer.Gcd(b, a);
            return Lehmer.Gcd(a, b);
        }
public static Integer Gcd ( this Integer left , Integer right ) { var a = Abs ( left ) ; var b = Abs ( right ) ; if ( a < b ) return Lehmer . Gcd ( b , a ) ; return Lehmer . Gcd ( a , b ) ; }
Finds the greatest common divisor of two Integers.
Finds the greatest common divisor of two Integers .
The greatest common divisor of left and right.
The greatest common divisor of left and right .
Integer
this
right
Integer
The second value.
The second value .
left
The first value.
The first value .