Click or drag to resize
DigitalRuneNumericCompare Method (Double, Double)
Compares two double values (regarding the tolerance EpsilonD).

Namespace: DigitalRune.Mathematics
Assembly: DigitalRune (in DigitalRune.dll) Version: 1.20.0.0 (1.20.1.14552)
Syntax
public static int Compare(
	double value1,
	double value2
)

Parameters

value1
Type: SystemDouble
The first value.
value2
Type: SystemDouble
The second value.

Return Value

Type: Int32
-1 if value1 is less than value2, +1 if value1 is greater than value2, and 0 if the values are equal (within the tolerance EpsilonF).
Remarks
Important: When at least one of the parameters is a special floating-point value (such as NaN, PositiveInfinity, or NegativeInfinity), the result is undefined. Such cases should be handled explicitly by the calling application.
See Also