10 Math.round(11.5) 等于多少,Math.round(-11.5)等于多少

Math.round():将括号内的数+0.5,然后向下取整

11.5 + 0.5 = 12,向下取整即12

-11.5 + 0.5 = -11,向下取整即-11

原文地址:https://www.cnblogs.com/xilichenbokeyuan/p/14151174.html