System.VarCmplx.VarComplexSimplify

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function VarComplexSimplify(const AValue: Variant): Variant;

C++

extern DELPHI_PACKAGE System::Variant __fastcall VarComplexSimplify(const System::Variant &AValue);

Properties

Type Visibility Source Unit Parent
function public
System.VarCmplx.pas
System.VarCmplx.hpp
System.VarCmplx System.VarCmplx

Description

Reduces a Variant that represents a complex number to one that represents a real value, if possible.

Use VarComplexSimplify to convert a complex number to a real value when possible. VarComplexSimplify checks whether the Variant specified by AValue represents a complex number that has no imaginary part. If so, it returns a Variant whose value is simply a real number. If AValue does not represent a complex number, or if AValue represents a complex number with a nonzero imaginary part, VarComplexSimplify returns AValue.

See Also