Error getting tags :
error 404Error getting tags :
error 404 atan2 | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
atan2
Basics
Expander triangle
Type
Function
Syntax

atan2(yCoordinate,xCoordinate)

See Also
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns the arc tangent of one number divided by another, using the sign of both.
Examples

atan2(-1,-1) -- returns 4/3 * pi
atan2(thisNumber,thatNumber)

Additional Comments
Expander triangle

Use the atan2 function to find the arc tangent of one number divided by another when sign is significant.

Parameters:

The yCoordinate is a number or an expression that evaluates to a number.

The xCoordinate is a number or an expression that evaluates to a number.

Value:

The atan2 function returns a number between -pi and pi.

Comments:

In most cases, atan2(y,x) is equal to atan(y/x). However, if both x and y are negative, the sign of x/y is positive. In this case, the atan function returns an angle in the first quadrant, but the atan2 function returns an angle in the third quadrant.

The result of the atan2 function is returned in radians. To get this result in degrees, use the following custom function:

function atan2InDegrees firstArg,secondArg

return atan2(firstArg,secondArg) * 180 / pi

end atan2InDegrees

User Comments
Expander triangle