FloatIsZero Function
Returns True if X is within ESBTolerance of 0.

Unit
QESBPCSMath

Declaration
Function FloatIsZero(const X: Extended): Boolean;

Description
For Values with large negative exponents, ESBTolerance will need to be changed to a smaller value. For an alternate approach try SameFloat (X, 0) when you wish a value to be within "precision" of 0.

Parameters
Float to process.

Returns
abs (X) < ESBTolerance.

Category
Comparison between Integers and Floats

Implementation

function FloatIsZero (const X: Extended): Boolean;
begin
     Result := abs (X) < ESBTolerance
End;


HTML generated by Time2HELP
http://www.time2help.com