Atan2 Function

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

Syntax
Atan2(X, Y)

Parameters

X
Specify the X coordinate value as a real number value.
Y
Specify the Y coordinate value as a real number value.

Return Values
Numeric value in radians (-PI to +PI).

Description
Atan2(X, Y) returns the angle of the line which connects points (0, 0) and (X, Y).

This trigonometric function returns an arctangent angle in all four quadrants.

See Also
Abs Function, Acos Function, Asin Function, Atan Function, Cos Function, DegToRad Function, RadToDeg Function, Sgn Function, Sin Function, Tan Function, Val Function

Atan2 Function Example

Function at2test
  Real x, y
  Print "Please enter a number for the X Coordinate:"
  Input x
  Print "Please enter a number for the Y Coordinate:"
  Input y
  Print "Atan2 of ", x, ", ", y, " is ", Atan2(x, y)
Fend