MathF.Ceiling(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 smallest integral value that is greater than or equal to the specified single-precision floating-point number.
public:
static float Ceiling(float x);
public static float Ceiling (float x);
static member Ceiling : single -> single
Public Shared Function Ceiling (x As Single) As Single
Parameters
- x
- Single
A single-precision floating-point number.
Returns
The smallest integral value that is greater than or equal to x
. If x
is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned. Note that this method returns a Single instead of an integral type.
Remarks
The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding toward positive infinity. In other words, if x
is positive, the presence of any fractional component causes x
to be rounded to the next highest integer. If x
is negative, the rounding operation causes any fractional component of x
to be discarded. The operation of this method differs from the Floor(Single) method, which supports rounding toward negative infinity.
Applies to
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για