[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'math' (#rtl)

SameValue

Check whether 2 float values are the same

Declaration

Source position: math.pp line 245

function SameValue(

  const A: Extended;

  const B: Extended

):Boolean; overload;

function SameValue(

  const A: Double;

  const B: Double

):Boolean; overload;

function SameValue(

  const A: Single;

  const B: Single

):Boolean; overload;

function SameValue(

  const A: Extended;

  const B: Extended;

  Epsilon: Extended

):Boolean; overload;

function SameValue(

  const A: Double;

  const B: Double;

  Epsilon: Double

):Boolean; overload;

function SameValue(

  const A: Single;

  const B: Single;

  Epsilon: Single

):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

MinFloat

  

Minimum value (closest to zero) of float type

IsZero

  

Check whether value is zero


Documentation generated on: Nov 16 2015