<-- Previous || Up || Next -->

Real To Complex Function
Math Complex Class

Public Function RealToComplex( _
      ByVal vReal As Variant _
    , ByVal vImag As Variant _
    ) As Variant

"Real Numbers To Complex Number"
Construct a complex number string from two real numbers.

Summary: If vReal and vImag are numeric and/or date values, then a complex number of the form "R|I" is returned. If vReal is numeric/date and vImag is not, vReal is returned as a numeric type. If vReal is non-numeric, then Null is returned.
Examples:
    RealToComplex(2, -3) = "2|-3"
    RealToComplex(6, 0) = 6
    RealToComplex(4, Null) = 4
    IsNull(RealToComplex(Null, 5)) = True
See also:
    ComplexStringToReals Function
    IsComplex Function
    RealPart Function
    ImagPart Function
vReal: The real part of the complex number that will be returned. Function returns Null if vReal is Null or cannot be fixed up to a number.

vImag: The imaginary part of the complex number being constructed. vImag defaults to 0 (zero) if it is Null or cannot be fixed up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.