DADiSP Worksheet Functions > Function Categories > Trigonometric Functions > ATAN2

 

ATAN2

Purpose:

Calculates the principal value of the inverse tangent.

Syntax:

ATAN2(y, x)

y      

-

Any expression evaluating to a scalar, series, or table.

x

-

Any expression evaluating to a scalar, series, or table.

Returns:

A scalar, series, or table, the inverse tangent of y / x.

Example:

atan(0, 1) returns 0.

Example:

atan2(1, 0) returns 1.570796, or π/2.

Example:

atan2(0, -1) returns 3.141593, or π.

Example:

atan2(-1, 0) returns -1.570796, or -π/2.

Example:

atan2(-2..0.1..2, -2..0.1..2)

 

returns a 41 point series where each point is the inverse tangent of the values from -2 to 2.

Remarks:

The signs of y and x are used to determine the quadrant of the return value.

 

-π  ≤  atan2(y, x)  ≤ π

 

The function calculates in radians unless degrees are specified with the SETDEGREE function.

See Also:

ANGLE

ATAN

ATANH

PHASE

SETDEGREE

SETRADIAN

TRIGONOMETRIC FUNCTIONS