@yesstudio/yes-utils
    Preparing search index...

    Function round

    • Computes number rounded to precision using method.

      Parameters

      • number: number

        The number to round.

      • options: RoundOptions = {}

        The function options.

      Returns number

      Returns the rounded number.

      round(1.23456)
      // => 1

      round(1.23456, { method: 'floor', precision: 2 })
      // => 1.23