Table of Contents

Method LessThanOrClose

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

LessThanOrClose(double, double)

LessThanOrClose - Returns whether or not the first double is less than or close to the second double. That is, whether or not the first is strictly less than or within epsilon of the other number. Note that this epsilon is proportional to the numbers themselves to that AreClose survives scalar multiplication. Note, There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false. This is important enough to repeat: NB: NO CODE CALLING THIS FUNCTION SHOULD DEPEND ON ACCURATE RESULTS - this should be used for optimizations only.

public static bool LessThanOrClose(double value1, double value2)

Parameters

value1 double

The first double to compare.

value2 double

The second double to compare.

Returns

bool

bool - the result of the LessThanOrClose comparision.