Utility.Compare (Double, Double) Method

Compares two floating point numbers using a relative error of 1e-8.
Public Shared Function Compare( _ 
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 a
double b 
)
This language is not supported or no code example is available.

Parameters

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