_.floor(number, [precision=0])
Computes number
rounded down to precision
.
Since
3.10.0
Arguments
number
(number): The number to round down.[precision=0]
(number): The precision to round down to.
Returns
(number): Returns the rounded down number.
Example
_.floor(4.006);// => 4_.floor(0.046, 2);// => 0.04_.floor(4060, -2);// => 4000
当前内容版权归 lodash.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 lodash.com .