ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## round + [link](./round "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L14044 "View in source.") + [npm](https://www.npmjs.com/package/lodash.round "See the npm package.") ``` _.round(number, [precision=0]) ``` 根据 precision 四舍五入 number。 ### 参数 1. number (number) 要四舍五入的值 2. [precision=0] (number) 精度 ### 返回值 (number) 返回四舍五入的结果 ### 示例 ``` _.round(4.006); // => 4 _.round(4.006, 2); // => 4.01 _.round(4060, -2); // => 4100 ```