Rounds variables toward negative infinity.UnitMathCategoryArithmetic routinesDelphi syntax:function Floor(const X: Extended): Integer;C++ syntax:extern PACKAGE int __fastcall Floor(const Extended X);DescriptionCall Floor to obtain the highest integer less than or equal to X. For example:Floor(-2.8) = -3Floor(2.8) = 2Floor(-1.0) = -1Note: The absolute value of X must be less than MaxInt.
比如取整trunc()
四舍五入round()
取整trunc()
四舍五入round()
还是不要开这样的玩笑
round()
可以用strtoint(floattostr())吧。