Sign in Join
FPDoc Onlineexperiment

SameValue function

In unit Math

Check whether 2 float values are the same.

Declaration

pascal
function SameValue(const A: Extended; const B: Extended): Boolean
 ; overload

Description

SameValue returns True if the floating-point values A and B are the same, i.e. whether the absolute value of their their difference is smaller than Epsilon. If their difference is larger, then False is returned.

If unspecified, the default value for Epsilon is 0.0.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.