Computes number rounded to precision using method.
number
precision
method
The number to round.
The function options.
Returns the rounded number.
round(1.23456)// => 1round(1.23456, { method: 'floor', precision: 2 })// => 1.23 Copy
round(1.23456)// => 1round(1.23456, { method: 'floor', precision: 2 })// => 1.23
Computes
number
rounded toprecision
usingmethod
.