augment-vir - v31.13.0
    Preparing search index...

    Function round

    • Round a value to the given number of decimal digits. If no decimal value is present, no rounding occurs.

      Parameters

      • value: number
      • __namedParameters: { digits: number }

      Returns number

      import {round} from '@augment-vir/common';

      // `result1` is `5.13`
      const result1 = round(5.125, {digits: 2});
      // `result2` is `5`
      const result2 = round(25, {digits: 2});