Javascript Math ceil()、floor()、round()三个函数的区别
Javascript Math ceil()、floor()、round()三个函数的区别Round是四舍五入的。。。Ceiling是向上取整。。float是向下取整 -ceil():将小数部分一律向整数部分进位。 如: Math.ceil(12.2)//返回13 Math.ceil(12.7)//返回13 Math.ceil(12
原创
2012-09-15 11:19:33 ·
921 阅读 ·
0 评论