java中的三种取整函数总结

如下所示:1.舍掉小数取整:Math.floor(3.5)=32.四舍五入取整:Math.rint(3.5)=43.进位取整:Math.ceil(3.1)=4

返回顶部