Math::Floor Method (Double)
Returns the largest integer less than or equal to the specified double-precision floating-point number.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- d
- Type: System::Double
A double-precision floating-point number.
Return Value
Type: System::DoubleThe largest integer less than or equal to d. If d is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned.
The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward negative infinity. In other words, if d is positive, any fractional component is truncated. If d is negative, the presence of any fractional component causes it to be rounded to the smaller integer. The operation of this method differs from the Ceiling method, which supports rounding toward positive infinity.
The following example illustrates the Math::Floor(Double) method and contrasts it with the Ceiling(Double) method.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.