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
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про