Atan2 Method

Description
Returns the angle of the imaginary line connecting points (0,0) and (X, Y) in radians.

Syntax
Function Atan2 (Dx As Double, Dy as Double) As Double

Parameters

  • Dx
    A real number indicating the X coordinate
  • Dy
    A real number indicating the Y coordinate

Return Value
A double value containing the angle.

See Also
Atan Method

Atan2 Example
VB Example:

Dim angle As Double  
  
angle = m_spel.Atan2(-25, 50)  

C# Example:

double angle;  
  
angle = m_spel.Atan2(-25, 50);