记录-Math.round(11.5)等於多少? Math.round(-11.5)等於多少?

来源:互联网 发布:二维数组初始化字符串 编辑:程序博客网 时间:2024/04/28 00:48
    Math.round(11.5)==12

    Math.round(-11.5)==-11


    round方法返回与参数最接近的长整数,参数加1/2后求其floor.
0 0
原创粉丝点击