Crystallography/Mathematics/GammaFunction.cs
/// <summary>
/// Returns the greatest common divisor of two integers using euclids algorithm.
/// </summary>
/// <returns>gcd(a,b)</returns>
Returns the greatest common divisor of two integers using euclids algorithm.
Returns the greatest common divisor of two integers using euclids algorithm .
public static long Gcd(long a, long b)
        {
            long rem;
            while (b != 0)
            {
                rem = a % b;
                a = b;
                b = rem;
            }
            return Math.Abs(a);
        }
public static long Gcd ( long a , long b ) { long rem ; while ( b != 0 ) { rem = a % b ; a = b ; b = rem ; } return Math . Abs ( a ) ; }
Returns the greatest common divisor of two integers using euclids algorithm.
Returns the greatest common divisor of two integers using euclids algorithm .
None
a
long
b
long