Math.round、Math.floor、Math.ceil 区别
摘要:
1、Math.round() 按照四舍五入的方式返回值 例如:Math.round(9.5)=10 Math.round(9.4)=9 2、Math.floor()返回最小整数 例如:Math.floor(9.5)=9 Math.floor(9.2)=9 3、Math.ceil()返回最大整数 例如 阅读全文
posted @ 2019-01-17 11:13 lovezj9012 阅读(213) 评论(0) 推荐(0)
浙公网安备 33010602011771号