Function Math Trig Complex Class

ACot2

Angle of the point (X, Y) where X and Y are real numbers. The point is expressed in rectangular coordinates. Function returns an angle in radians that is between -Pi/2 and Pi/2.

Signature (Visual Basic / VBA)

Public Function ACot2( _
      ByVal vX As Variant _
    , ByVal vY As Variant _
    ) As Variant

Code Example

    ACot2(-1,  0) =  0
    ACot2(-1,  1) =  2.35619449019234
    ACot2( 0,  1) =  1.5707963267949
    ACot2( 1,  1) =  0.785398163397448
    ACot2( 1,  0) =  0
    ACot2( 1, -1) = -0.785398163397448
    ACot2( 0, -1) = -1.5707963267949
    ACot2(-1, -1) = -2.35619449019234

Parameters

Parameter Description
vX The X-coordinate of the point whose angle from the origin is to be returned. Function returns Null if vX is Null or cannot be fixed up to a number.
vY The Y-coordinate of the point whose angle from the origin is to be returned. Function returns Null if vY is Null or cannot be fixed up to a number.