Skip to content

Math.ceil 和 Math.floor 有什么区别?

参考答案:

Math.ceil() : 向上取整,函数返回一个大于或等于给定数字的最小整数。

Math.floor() : 向下取整,函数返回一个小于或等于给定数字的最大整数。