_.round(number, [precision=0])

根据 precision 四舍五入 number。

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

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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-19
  • 2022-12-23
  • 2021-11-29
  • 2021-08-27
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案