DoubleComparer.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.0
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