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

Math.round(11.5)的返回值是 12,Math.round(-11.5)的返回值是-11。四舍五 

入的原理是在参数上加 0.5 然后进行下取整

原文地址:https://www.cnblogs.com/programb/p/13019245.html