johnny 发表于 2016-7-28 17:54:53

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.


页: [1]
查看完整版本: 21 、Math.round(11.5)等於多少? Math.round(-11.5)等於多少?