• Get the greatest common divisor of 2 numbers

    Parameters

    • a: number
    • b: number

    Returns number

    Example

    import { number } from "@rjweb/utils"

    number.gcd(5, 10) // 5
    number.gcd(10, 15) // 5

    Since

    1.12.17

    Supports

    nodejs, browser