round ceil floor
2020-08-21 本文已影响0人
hehehehe
Math.round():返回值是 int/long 类型的,理解为Math.floor(x+0.5):在原来的数上+0.5再向下取整)
Math.floor():返回值是double类型的,向下取整
Math.ceil():返回值是double类型的,向上取整
Math.round():返回值是 int/long 类型的,理解为Math.floor(x+0.5):在原来的数上+0.5再向下取整)
Math.floor():返回值是double类型的,向下取整
Math.ceil():返回值是double类型的,向上取整