Compares two Double values and returns a value indicating whether one is less than, equal to or greater than the other.

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Function Compare ( _
	x As Double, _
	y As Double _
) As Integer
C#
public int Compare (
	double x,
	double y
)
C++
public:
virtual int Compare (
	double x, 
	double y
) sealed

Parameters

x (System.Double)
A real number.
y (System.Double)
A real number.

Return Value

ValueCondition
Less than zerox is less than y.
Zerox equals y within the specified tolerance.
Greater than zerox is greater than y.

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.