the number to round.
the nearest whole number to round to.
The rounded number.
if any of the arguments are either not finite, NaN or not an integer.
roundToNearest(111, 1) //=> 111
roundToNearest(111, 10) //=> 110
roundToNearest(111, 100) //=> 100
roundToNearest(111, 1000) //=> 0
roundToNearest(13, 3) //=> 12
Generated using TypeDoc
Round a given number to a given nearest whole number.