为什么80%的码农都做不了架构师?>>> Math.round(11.5)的返回值是12,Math.round(-11.5)的返回值是-11。 四舍五入的原理是在参数上加0.5然后进行下取整。 转载于:https://my.oschina.net/hfq/blog/1812633