@pengzhanbo/utils - v3.4.1
    Preparing search index...

    Function lcm

    • Least Common Multiple (LCM) of two numbers

      计算两个数的最小公倍数

      Parameters

      • a: number

        The first number. 第一个数

      • b: number

        The second number. 第二个数

      Returns number

      The least common multiple of a and b. a和b的最小公倍数

      lcm(12, 8) // => 24
      lcm(17, 13) // => 221
      lcm(0, 5) // => 0