RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.Floor Function

Rounds variables toward negative infinity.

Pascal
function Floor(const X: Extended): Integer;
C++
int Floor(const Extended X);

Call Floor to obtain the highest integer less than or equal to X. For example: 

Floor(-2.8) = -3 

Floor(2.8) = 2 

Floor(-1.0) = -1

Note: The absolute value of X must be less than MaxInt.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!