Table of Contents

Method LessThanOrClose

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

LessThanOrClose(double, double)

Determines whether the first double-precision floating-point value is less than or approximately equal to the second value.

public static bool LessThanOrClose(double value1, double value2)

Parameters

value1 double

The first double-precision floating-point value to compare.

value2 double

The second double-precision floating-point value to compare.

Returns

bool

true if value1 is less than value2, or if the two values are approximately equal; otherwise, false.

Remarks

The method uses a predefined tolerance to determine whether the two values are approximately equal. This is useful for comparisons where floating-point precision errors might otherwise lead to unexpected results.

LessThanOrClose(float, float)

Determines whether the first floating-point value is less than or approximately equal to the second value.

public static bool LessThanOrClose(float value1, float value2)

Parameters

value1 float

The first floating-point value to compare.

value2 float

The second floating-point value to compare.

Returns

bool

true if value1 is less than value2, or if the two values are approximately equal; otherwise, false.

Remarks

The method uses a predefined tolerance to determine whether the two values are approximately equal. This is useful for comparisons where floating-point precision errors might otherwise lead to unexpected results.