System.Math.Floor
Delphi
function Floor(const X: Single): Integer;
function Floor(const X: Double): Integer;
function Floor(const X: Extended): Integer;
C++
extern DELPHI_PACKAGE int __fastcall Floor(const float X)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Math.pas System.Math.hpp |
System.Math | System.Math |
Description
Rounds variables toward negative infinity.
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.