System.Math.Floor

Aus RAD Studio API Documentation
Wechseln zu: Navigation, Suche

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 */;

Eigenschaften

Typ Sichtbarkeit Quelle Unit Übergeordnet
function public
System.Math.pas
System.Math.hpp
System.Math System.Math

Beschreibung

Rundet Variablen in Richtung auf minus unendlich.

Mit Floor ermitteln Sie die höchste Ganzzahl, die kleiner oder gleich X ist. Zum Beispiel:

Floor(-2,8) = -3

Floor(2,8) = 2

Floor(-1,0) = -1

Hinweis: Der absolute Wert von X muss kleiner als MaxInt sein.

Siehe auch