JCL Help:FloatsEqual

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Compares two floats for equality.


Pascal

 function FloatsEqual(const X: Float; const Y: Float): Boolean;


Parameters

Parameters Description
X1 First value to compare.
X2 Second value to compare.


Return Value

If the two supplied values are equal within the precision defined by the PrecisionTolerance global variable, the function returns True, otherwise it returns False.


Description

FloatsEqual compares the two supplied floating point values for equality within the precision defined by the PrecisionTolerance global variable. Thus the two values are considered to be equal if the absolute difference between them is smaller than the value defined by PrecisionTolerance.


See Also

FloatIsZero


About

Unit

JclMath


Donator

ESB Consultancy


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page