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.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor