美文网首页
Math.round(11.5) 等于多少?Math.round

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

作者: 唐怀瑟_ | 来源:发表于2018-07-25 17:16 被阅读348次

    Math.round(11.5)的返回值是12,Math.round(-11.5)的返回值是-11。四舍五入的原理是在参数上加0.5然后进行下取整。

    相关文章

      网友评论

          本文标题:Math.round(11.5) 等于多少?Math.round

          本文链接:https://www.haomeiwen.com/subject/jhcmmftx.html