飞网论坛

标题: 21 、Math.round(11.5)等於多少? Math.round(-11.5)等於多少? [打印本页]

作者: johnny    时间: 2016-7-28 17:54
标题: 21 、Math.round(11.5)等於多少? Math.round(-11.5)等於多少?
21 、Math.round(11.5)等於多少? Math.round(-11.5)等於多少?

Math.round(11.5)==12

Math.round(-11.5)==-11

round方法返回与参数最接近的长整数,参数加1/2后求其floor.







欢迎光临 飞网论坛 (https://bbs.cfei.net/) Powered by Discuz! X3.2