Options
All
  • Public
  • Public/Protected
  • All
Menu

Module round

Index

References

Functions Math

References

Renames and re-exports round

Math Functions

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

    since

    4.7.0

    example
    round(4.006)
    // => 4

    round(4.006, 2)
    // => 4.01

    round(4060, -2)
    // => 4100

    Parameters

    • num: number

      The number to round down.

    • precision: number = 0

      The precision to round down to.

    Returns number

    Returns the rounded down number.