4.17.11
3.10.1
2.4.2
1.3.1
_.round(number, [precision=0])
Computes number
rounded to precision
.
Since
3.10.0
Arguments
argument
number
[precision=0]
type
number
number
description
The number to round.
The precision to round to.
Returns
(array)
Example
_.round(4.006);
// => 4
_.round(4.006, 2);
// => 4.01
_.round(4060, -2);
// => 4100
_.round(4.006);
// => 4
_.round(4.006, 2);
// => 4.01
_.round(4060, -2);
// => 4100