round

Math
since 3.10.0

Arguments

  • number The number to round.
  • number The precision to round to.

Returns

number the rounded number.

Computes number rounded to precision.

Example of Lodash _.round

_.round(4.006);
// => 4

_.round(4.006, 2);
// => 4.01

_.round(4060, -2);
// => 4100