RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Math.SameValue Function

Indicates whether two floating-point values are (approximately) equal.

Pascal
function SameValue(const A: Extended; const B: Extended; Epsilon: Extended = 0): Boolean; overload;
function SameValue(const A: Double; const B: Double; Epsilon: Double = 0): Boolean; overload;
function SameValue(const A: Single; const B: Single; Epsilon: Single = 0): Boolean; overload;
C++
Boolean SameValue(const Extended A, const Extended B, Extended Epsilon = 0);
Boolean SameValue(const Double A, const Double B, Double Epsilon = 0);
Boolean SameValue(const Single A, const Single B, Single Epsilon = 0);

Math

Call SameValue to determine when two floating-point values are equal, or approximately equal. 

A and B are the values to compare. 

Epsilon is the maximum amount by which A and B can differ and still be considered the same value. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!