@laserware/arcade
    Preparing search index...

    Function round

    • Rounds the specified value to the specified precision.

      Parameters

      • value: number

        The number to round.

      • Optionalprecision: number = 0

        The precision to round to.

      Returns number

      Number rounded to the specified precision.

      round(4.006);
      // 4

      round(4.006, 2);
      // 4.01

      round(4060, -2);
      // 4100