681 B
681 B
title | localeTitle |
---|---|
Math Ceil | 数学Ceil |
数学Ceil
Math.ceil()
是Math标准对象的一种方法,它将给定数字向上舍入到下一个整数。请注意,对于负数,这意味着该数字将被“舍入为0”而不是更大的绝对值数(参见示例)。
例子
Math.ceil(0.1) // 1
Math.ceil(1.3) // 2
Math.ceil(-0.9) // -0
Math.ceil(-1.5) // -1