Utility.Compare (Double, Double, Double) Method

Compares two floating point numbers using the given error tolerance.
Public Shared Function Compare( _ 
ByVal tol As Double, _ 
ByVal a As Double, _ 
ByVal b As Double
) As Integer
This language is not supported or no code example is available.
public static int Compare( 
double tol
double a
double b 
)
This language is not supported or no code example is available.

Parameters

tol
double

a
double

First number

b
double

Second number

Return Value

int

Returns -1: first < second 0: first == second +1: first > second

.NET Framework

Supported in: 4.8

In this article

Definition