ATAN2()

Syntax. ATAN2(x_num,y_num)

Definition. This function returns the arctangent based on an x-coordinate or a y-coordinate. The arctangent is the angle between the x-axis and a line through the origin (0, 0) and a point defined by the x-coordinate and y-coordinate.

The angle is returned as a radian measure between –π and π, excluding –π.

Arguments

  • x_num (required) The x-coordinate of the point

  • y_num (required) The y-coordinate of the point

Background. The ATAN2() function is another inverse tangent function (see Figure 16-8). However, the result is not calculated based on a tangent but on an xy-coordinate. The result is a radian measure and has to be converted into degrees with the DEGREES() function or by multiplying the result with 180/PI().

A positive result represents a counterclockwise angle from the x-axis; a negative result represents a clockwise angle.

The result of the formula =ATAN2(a,b) equals ATAN(b/a), except that a can equal zero in ATAN2().

If both x_num and y_num are zero, the ATAN2() function returns the #DIV/0! error.

The ATAN2() function.

Figure 16-8. The ATAN2() function.

Examples. This function is used to calculate the angle α based on the calculation of x-coordinates and y-coordinates. More examples for this function are:

  • =DEGREES(ATAN2(1,2)) returns 85.236º for angle α.

  • =DEGREES(ATAN2(-6,-2)) returns -130.601º for angle α.

  • =DEGREES(ATAN2(11,2)) returns 10.305º for angle α.

See Also

ATAN(), ATANH(), PI(), TAN()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.5.201