Function fixedRound

Corrects a floating number to a given number of decimal places.

fixedRound(5.2345, 2); // 5.23
  • Parameters

    • value: number

      the value to round

    • decimals: number

      the number of decimals

    Returns number

    the rounded value