• Calculates the greatest common divisor (GCD) of two numbers.

    Returns

    The greatest common divisor of a and b.

    Throws

    An error if either a or b is not a positive integer.

    Parameters

    • a: number

      The first number.

    • b: number

      The second number.

    Returns number

Generated using TypeDoc