Math.Floor()取整,即求一个最接近它的整数,它的值小于等于这个浮点数
Math.Round()是四舍五入取整
Math.floor(0.60) -- 0
Math.floor(0.40) -- 0
Math.floor(5) -- 5
Math.floor(5.1) -- 5
Math.floor(-5.1) -- -6
Math.floor(-5.9) -- -6
Math.Floor()取整,即求一个最接近它的整数,它的值小于等于这个浮点数
Math.Round()是四舍五入取整
Math.floor(0.60) -- 0
Math.floor(0.40) -- 0
Math.floor(5) -- 5
Math.floor(5.1) -- 5
Math.floor(-5.1) -- -6
Math.floor(-5.9) -- -6