三种取整方式

2018-01-02  本文已影响0人  charlieyan

舍掉小数取整:Math.floor(3.5)=3
四舍五入取整:Math.rint(3.5)=4
进位取整:Math.ceil(3.1)=4

上一篇 下一篇

猜你喜欢

热点阅读