舍掉小数取整:Math.floor(3.5)=3四舍五入取整:Math.rint(3.5)=4进位取整:Math.ceil(3.1)=4 转载于:https://www.cnblogs.com/MrtL/p/7661543.html