Table of Contents

Method IsOne

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

IsOne(double)

Determines whether the specified value is equal to 1.0 within a small tolerance.

public static bool IsOne(double value)

Parameters

value double

The double-precision floating-point number to compare to 1.0.

Returns

bool

true if the specified value is approximately equal to 1.0; otherwise, false.

Remarks

This method uses a tolerance-based comparison to account for potential floating-point precision errors.

IsOne(float)

Determines whether the specified value is equal to 1.0 within a small tolerance.

public static bool IsOne(float value)

Parameters

value float

The floating-point number to compare to 1.0.

Returns

bool

true if the specified value is approximately equal to 1.0; otherwise, false.

Remarks

This method uses a tolerance-based comparison to account for potential floating-point precision errors.