NewDash
    Preparing search index...

    Function floor

    • Computes number rounded down to precision.

      Parameters

      • num: number

        The number to round down.

      • precision: number = 0

        The precision to round down to.

      Returns number

      Returns the rounded down number.

      5.7.0

      floor(4.006)
      // => 4

      floor(0.046, 2)
      // => 0.04

      floor(4060, -2)
      // => 4000