matician - v2.0.0
    Preparing search index...

    Function round

    • Rounds a number to the nearest integer.

      Parameters

      • value: number

        The number to round.

      Returns number

      The nearest integer to the given number.

      round(3.5);   // returns 4
      round(2.49); // returns 2
      round(-2.5); // returns -2