Crystallography/Mathematics/GammaFunction.cs
/// <summary>
/// Returns the least common multiple of two integers using euclids algorithm.
/// </summary>
/// <returns>lcm(a,b)</returns>
Returns the least common multiple of two integers using euclids algorithm.
Returns the least common multiple of two integers using euclids algorithm .
public static long Lcm(long a, long b)
        {
            if (a == 0 && b == 0)
                return 0;
            return Math.Abs(a * b) / Gcd(a, b);
        }
public static long Lcm ( long a , long b ) { if ( a == 0 && b == 0 ) return 0 ; return Math . Abs ( a * b ) / Gcd ( a , b ) ; }
Returns the least common multiple of two integers using euclids algorithm.
Returns the least common multiple of two integers using euclids algorithm .
// TODO: Direct Implementation for preventing overflows.
None
a
long
b
long