Options
All
  • Public
  • Public/Protected
  • All
Menu

Module floor

Index

References

Functions Math

References

Renames and re-exports floor

Math Functions

  • floor(num: number, precision?: number): number
  • Computes number rounded down to precision.

    since

    5.7.0

    example
    floor(4.006)
    // => 4

    floor(0.046, 2)
    // => 0.04

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

    Parameters

    • num: number

      The number to round down.

    • precision: number = 0

      The precision to round down to.

    Returns number

    Returns the rounded down number.