博主:http://blog.sina.com.cn/s/blog_905e347b0101fcbm.html
在java中的Math类中有三种方法对浮点数取整
floor //向下取整
ceil //向上取整
round //四舍五入取整
例如:
Math.floor(1.3); // 1
Math.floor(1.7); //1
Math.ceil(1.3); //2
Math.ceil(1.7); //2
Math.round(1.3); //1
Math.round(1.7); //2