转载自:
https://blog.csdn.net/colourful_sky/article/details/76584532
fix:朝0方向取整,如:
>> fix(2.8) = 2
>> fix(-2.8) = -2
floor:朝负无穷方向取整,如:
>>floor(2.8) = 2
>>floor(-2.8) = -3
ceil:朝正无穷方向取整,如:
>>ceil(2.8) = 3
>>ceil(-2.8) = -2
round:四舍五入到最近的整数,如:
>>round(2.8) = 3
>>round(-2.8) = -3