System.Math.SameValue

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function SameValue(const A, B: Extended; Epsilon: Extended): Boolean;
function SameValue(const A, B: Double; Epsilon: Double): Boolean;
function SameValue(const A, B: Single; Epsilon: Single): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall SameValue(const System::Extended A, const System::Extended B, System::Extended Epsilon = 0.000000E+00)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.Math.pas
System.Math.hpp
System.Math System.Math

説明

2 つの浮動小数点値が(ほぼ)等しいかどうかを示します。

SameValue を呼び出すと、2 つの浮動小数点値が等しいまたはほぼ等しいかどうかを判定できます。

A と B は比較する値です。

Epsilon は、A と B が異なっていても同じ値と見なせる最大差です。

関連項目