Double Comparer.Compare Method
Compares two Double values and returns
a value indicating whether one is less than, equal to or greater than the other.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public int Compare(
double x,
double y
)
Parameters
Return Value
Int32Value | Condition |
---|---|
Less than zero | x is less than y. |
Zero | x equals y within the specified tolerance. |
Greater than zero | x is greater than y. |
Implements
IComparer<T>.Compare(T, T)Remarks
Two numbers are considered equal if the absolute value of their difference is less than Tolerance times the larger of the absolute values of x and y.