The number to round.
The number of decimal places to round to. Defaults to 0.
The rounded number.
roundToDecimal(3.14159, 2); // Returns: 3.14
roundToDecimal(3.14159, 0); // Returns: 3
roundToDecimal(3.5); // Returns: 4
roundToDecimal(3.4); // Returns: 3
Generated using TypeDoc
Rounds a number to a specified number of decimal places.