您好,欢迎访问一九零五行业门户网

js中取整方法的比较

math.ceil():向上取整
math.floor():向下取整
math.round():四舍五入
    需要注意的比如:math.ceil(-1.6) = -1.0;
                          math.round(-1.5) = -1;
                          math.round(-1.6) = -2;
以上就是js中取整方法的比较的详细内容。
其它类似信息

推荐信息