Double Comparer.Compare Method
Compares two Double values and returns
whether one is less than, equal to or greater than the other.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
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.