Description |
Returns as a Double the nearest integer that is equal to or less than the given Value.
|
| Notes | Round, Trunc, Inc and Frac in the Delphi run time library System unit perform differently to Floor.
Static methods are not methods of an object - they are simply class functions or procedures available at any time.
|
|
Microsoft MSDN Links |
System
System.Math
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
float : Double;
begin
float := System.Math.Floor(12.0);
Console.WriteLine('Floor(12.0) = {0}', float.ToString);
float := System.Math.Floor(12.34);
Console.WriteLine('Floor(12.34) = {0}', float.ToString);
float := System.Math.Floor(12.99);
Console.WriteLine('Floor(12.99) = {0}', float.ToString);
Console.ReadLine;
end.
| Show full unit code | Floor(12.0) = 12
Floor(12.34) = 12
Floor(12.99) = 12
|
|
|
|