Difference between revisions of "Documentation/How Tos/Calc: ATAN2 function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (Syntax:)
Line 12: Line 12:
  
 
: <tt>'''ATAN2'''</tt> returns the inverse trigonometric tangent, that is, the angle (in radians) between the x-axis and a line from point <tt>'''x_coord'''</tt>, <tt>'''y_coord'''</tt> to the origin. The angle returned is between <tt>'''-PI'''</tt> and <tt>'''PI'''</tt>.
 
: <tt>'''ATAN2'''</tt> returns the inverse trigonometric tangent, that is, the angle (in radians) between the x-axis and a line from point <tt>'''x_coord'''</tt>, <tt>'''y_coord'''</tt> to the origin. The angle returned is between <tt>'''-PI'''</tt> and <tt>'''PI'''</tt>.
 
  
 
: To return the angle in degrees, use the <tt>'''DEGREES'''</tt> function.
 
: To return the angle in degrees, use the <tt>'''DEGREES'''</tt> function.

Revision as of 06:40, 2 March 2008


ATAN2

Returns the inverse tangent (the arctangent) for specified x and y coordinates.

Syntax:

ATAN2(x_coord; y_coord)

x_coord is the value of the x coordinate.
y_coord is the value of the y coordinate.
ATAN2 returns the inverse trigonometric tangent, that is, the angle (in radians) between the x-axis and a line from point x_coord, y_coord to the origin. The angle returned is between -PI and PI.
To return the angle in degrees, use the DEGREES function.

Example:

ATAN2(20; 20)

returns 0.785398163397448 (PI/4 radians).

DEGREES(ATAN2(12.3; 12.3))

returns 45. The tangent of 45 degrees is 1.

See also:

COS, SIN, TAN, COT

ACOS, ASIN, ATAN, ACOT

DEGREES

Mathematical functions

Personal tools