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

ARG Function
Math Trig Complex Class

Public Function ARG( _
    ByVal vX As Variant _
    ) As Variant

"Argument"
Returns the polar angle of a rectangular coordinate pair represented by a complex number.

Examples:
    Arg("1|1") = 0.785398163397448
    Arg("2|2") = 0.785398163397448
    Arg("2|3") = 0.982793723247329
    Arg("2|4") = 1.10714871779409
    Arg("-2|-2") = -2.46740110027234
    Arg("-2|-4") = -3.47821027825327
    Arg("2|0") = 0
    IsNull(Arg("0|2")) = True
See also:
    Absolute Function
vX: A complex number representing the rectangular coordinates whose argument is returned. The real part represents the X-coordinate and the imaginary part represents the Y-coordinate. Function returns Null if vX is Null or cannot be fixed up to a real or complex number (as defined by the ComplexStringToReals function). Complex numbers are represented within strings as "R|I" where R is the real part and I is the imaginary part.

Definition:

    RealPart >= 0: ATan(RealPart / ImagPart)
    RealPart <  0: ATan(RealPart / ImagPart) * Pi * Sign(ImagPart)

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