1、ceil():将小数部分一律向整数部分进位。
Math.ceil(12.2)//返回13
2、floor():一律舍去,仅保留整数
Math.floor(12.2)// 返回12
3、round():进行四舍五入
Math.round(12.2)// 返回12
4、Math.abs()方法: 返回一个数字的绝对值
Math.abs(-1); //1