ts-data-forge
    Preparing search index...

    Function round

    • Creates a reusable rounding function with a fixed precision.

      This is a curried version of roundAt that returns a function configured to always round to the specified number of decimal places. Useful for creating consistent rounding behavior across multiple values.

      Parameters

      • digit: PositiveSafeIntWithSmallInt

        The number of decimal places for rounding

      Returns (num: number) => number

      A function that rounds numbers to the specified precision