1.向下取整
Math.floor( 6.5); // 6
2.向上取整
Math.ceil(6.1); // 7
3.四舍五入取整
Math.round(6.5); // 7
4.四舍五入到N位小数
(6.5436).toFixed(3); // 6.544
1.向下取整
Math.floor( 6.5); // 6
2.向上取整
Math.ceil(6.1); // 7
3.四舍五入取整
Math.round(6.5); // 7
4.四舍五入到N位小数
(6.5436).toFixed(3); // 6.544