ceil
最后更新于:2022-04-02 00:03:48
## ceil
+ [link](./ceil "Link to this entry.")
+ [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L13883 "View in source.")
+ [npm](https://www.npmjs.com/package/lodash.ceil "See the npm package.")
```
_.ceil(number, [precision=0])
```
根据 `precision` 向上舍入 `number`。
### 参数
1. number (number)
要向上舍入的值
2. [precision=0] (number)
精度
### 返回值 (number)
返回向上舍入的结果
### 示例
```
_.ceil(4.006);
// => 5
_.ceil(6.004, 2);
// => 6.01
_.ceil(6040, -2);
// => 6100
```
';