function VarComplexCreate(): Variant; overload; function VarComplexCreate(const AReal: Double): Variant; overload; function VarComplexCreate(const AReal: Double; const AImaginary: Double): Variant; overload; function VarComplexCreate(const AText: string): Variant; overload;
System::Variant __fastcall VarComplexCreate(void);
Returns a custom Variant that represents a complex number.
Call VarComplexCreate to create a Variant whose value is a complex number.
AReal is the real part of the complex number.
AImaginary is the imaginary part of the complex number.
Using the first three versions of the constructor, omitting AReal or AImaginary results in a real or imaginary part of 0.
Using the last syntax, AText is parsed using the ComplexNumberSymbol and ComplexNumberSymbolBeforeImaginary global variables and, if the string represents a complex value, that becomes the value of the new Variant. If the string can't be parsed into a complex number, VarComplexCreate raises an EConvertError exception.
Complex Variants are custom Variants that represent complex numbers. The Variant type supports direct manipulation using the addition, subtraction, multiplication, division (but not integer division), and negation operators. They have 5 published properties: Real, Imaginary, Radius, Theta, and FixedTheta. They can be cast to and from integer types, floating point types, string types, TDateTime values, and boolean values. In addition, the VarCmplx unit implements a number of global functions for operating on complex Variants.