企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## floor + [link](./floor "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L13905 "View in source.") + [npm](https://www.npmjs.com/package/lodash.floor "See the npm package.") ``` _.floor(number, [precision=0]) ``` 根据 `precision` 向下保留 `number`。 ### 参数 1. number (number) 要向下保留的数 2. [precision=0] (number) 精度 ### 返回值 (number) 返回向下保留的结果 ### 示例 ``` _.floor(4.006); // => 4 _.floor(0.046, 2); // => 0.04 _.floor(4060, -2); // => 4000 ```