Rounds value to the specified number of decimal places.
value
The number to round.
Number of decimal places.
roundTo(1.2345, 2) // => 1.23roundTo(1.5, 0) // => 2roundTo(-1.23, 1) // => -1.2 Copy
roundTo(1.2345, 2) // => 1.23roundTo(1.5, 0) // => 2roundTo(-1.23, 1) // => -1.2
Rounds
valueto the specified number of decimal places.