TotalOrderIeee754Comparer<T>.Compare(T, T) 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.
Compares two numbers with IEEE 754 totalOrder semantic and returns a value indicating whether one is less than, equal to, or greater than the other.
public:
virtual int Compare(T x, T y);
public int Compare (T? x, T? y);
abstract member Compare : 'T * 'T -> int
override this.Compare : 'T * 'T -> int
Public Function Compare (x As T, y As T) As Integer
Parameters
- x
- T
The first number to compare.
- y
- T
The second number to compare.
Returns
A signed integer that indicates the relative values of x
and y
, as shown in the following table.
Value | Meaning |
---|---|
Less than zero | x is less than y |
Zero | x equals y |
Greater than zero | x is greater than y |
Implements
Remarks
IEEE 754 specification defines totalOrder as <= semantic. totalOrder(x,y) is true
when the result of this method is less than or equal to 0.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για