MathF.Floor(Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the largest integral value less than or equal to the specified single-precision floating-point number.
public:
static float Floor(float x);
public static float Floor (float x);
static member Floor : single -> single
Public Shared Function Floor (x As Single) As Single
Parameters
- x
- Single
A single-precision floating-point number.
Returns
The largest integral value less than or equal to x
. If x
is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned.
Remarks
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 x
is positive, any fractional component is truncated. If x
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.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för