2009年7月29日星期三

JAVA中的取整函数

舍掉小数取整:Math.floor(3.5)=3
四舍五入取整:Math.rint(3.5)=4
进位取整:Math.ceil(3.1)=4

没有评论:

发表评论