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

来源:互联网 发布:rmvb转mp4软件 编辑:程序博客网 时间:2024/04/28 13:33

Math.round(11.5)==12
Math.round(-11.5)==-11
round方法返回与参数最接近的长整数,参数加1/2后求其floor.

0 0
原创粉丝点击