DoubleComparer.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#
public int Compare(
	double x,
	double y
)

Parameters

x  Double
A real number.
y  Double
A real number.

Return Value

Int32
ValueCondition
Less than zerox is less than y.
Zerox equals y within the specified tolerance.
Greater than zerox 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.

See Also