Math.ceil(x):向正无限大方向舍入的舍入模式,比x大的最小值
Math.ceil(8.3)=9.0
Math.ceil(-8.3)=-8.0
Math.floor(x):向负无限大方向舍入的舍入模式,比x小的最大值
Math.floor(-1.4)=-2.0
Math.floor(1.8)=1.0
Math.round(x):四舍五入
Math.round(-2.7)=-3
Math.round(-2.3)=-2
Math.round(4.3)=4
Math.ceil(x):向正无限大方向舍入的舍入模式,比x大的最小值
Math.ceil(8.3)=9.0
Math.ceil(-8.3)=-8.0
Math.floor(x):向负无限大方向舍入的舍入模式,比x小的最大值
Math.floor(-1.4)=-2.0
Math.floor(1.8)=1.0
Math.round(x):四舍五入
Math.round(-2.7)=-3
Math.round(-2.3)=-2
Math.round(4.3)=4