NAME
atan2, atan2f, atan2l - arc tangent function of two variables
SYNOPSIS
#include <math.h> double atan2(double y, double x); float atan2f(float y, float x); long double atan2l(long double y, long double x); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): atan2f(), atan2l(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
DESCRIPTION
These functions calculate the principal value of the arc tangent of y/x, using the signs of the two arguments to determine the quadrant of the result.
RETURN VALUE
On success, these functions return the principal value of the arc tangent of y/x in radians; the return value is in the range [-pi, pi]. If y is +0 (-0) and x is less than 0, +pi (-pi) is returned. If y is +0 (-0) and x is greater than 0, +0 (-0) is returned. If y is less than 0 and x is +0 or -0, -pi/2 is returned. If y is greater than 0 and x is +0 or -0, pi/2 is returned. If either x or y is NaN, a NaN is returned. If y is +0 (-0) and x is -0, +pi (-pi) is returned. If y is +0 (-0) and x is +0, +0 (-0) is returned. If y is a finite value greater (less) than 0, and x is negative infinity, +pi (-pi) is returned. If y is a finite value greater (less) than 0, and x is positive infinity, +0 (-0) is returned. If y is positive infinity (negative infinity), and x is finite, pi/2 (-pi/2) is returned. If y is positive infinity (negative infinity) and x is negative infinity, +3*pi/4 (-3*pi/4) is returned. If y is positive infinity (negative infinity) and x is positive infinity, +pi/4 (-pi/4) is returned.
ERRORS
No errors occur.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). Interface Attribute Value atan2(), atan2f(), atan2l() Thread safety MT-Safe
CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. The variant returning double also conforms to SVr4, 4.3BSD, C89.
SEE ALSO
acos(3), asin(3), atan(3), carg(3), cos(3), sin(3), tan(3)
COLOPHON
This page is part of release 4.09 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2016-03-15 ATAN2(3)
More Linux Commands
manpages/glTexSubImage2D.3gl.html
glTexSubImage2D(3gl) - specify a two-dimensional texture sub
glTexSubImage2D.3gl - Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable
manpages/cacos.3.html
cacos(3) - complex arc cosine (Library - Linux man page)....
The cacos() function calculates the complex arc cosine of z. If y = cacos(z), then z = ccos(y). The real part of y is chosen in the interval [0,pi]. One has: ca
manpages/mlockall.2.html
mlockall(2) - lock and unlock memory - Linux manual page....
mlock() and mlockall() respectively lock part or all of the calling processs virtual address space into RAM, preventing that memory from being paged to the swap
manpages/infnan.3.html
infnan(3) - deal with infinite or not-a-number (NaN) result
The infnan() function returns a suitable value for infinity and not-a-number (NaN) results. The value of error can be ERANGE to represent infinity or anything e
manpages/recode.1.html
recode(1) - manual page for recode 3.6 - Linux manual page
Free recode converts files between various character sets and surfaces. If a long option shows an argument as mandatory, then it is mandatory for the equivalent
manpages/new_field.3form.html
new_field(3form) - create and destroy form fields (ManPage)
The function new_field allocates a new field and initializes it from the parameters given: height, width, row of upper-left corner, column of upper-left corner,
manpages/racoonctl.8.html
racoonctl(8) - racoon administrative control tool (ManPage)
racoonctl is used to control racoon(8) operation, if ipsec-tools was configured with adminport support. Communication between racoonctl and racoon(8) is done th
manpages/ctime.3.html
ctime(3) - transform date and time to broken-down time or AS
The ctime(), gmtime() and localtime() functions all take an argument of data type time_t, which represents calendar time. When interpreted as an absolute time v
manpages/rpmgraph.8.html
rpmgraph(8) - Display RPM Package Dependency Graph (ManPage)
rpmgraph uses PACKAGE_FILE arguments to generate a package dependency graph. Each PACKAGE_FILE argument is read and added to an rpm transaction set. The element
manpages/XML::PatAct::ToObjects.3pm.html
XML::PatAct::ToObjects(3pm) - An action module for creating
XML::PatAct::ToObjects is a PerlSAX handler for applying pattern-action lists to XML parses or trees. XML::PatAct::ToObjects creates Perl objects of the types a
manpages/Tk_GetRootCoords.3.html
Tk_GetRootCoords(3) - Compute root-window coordinates of win
This procedure scans through the structural information maintained by Tk to compute the root-window coordinates corresponding to the upper-left corner of tkwins
manpages/getgrouplist.3.html
getgrouplist(3) - get list of groups to which a user belongs
The getgrouplist() function scans the group database (see group(5)) to obtain the list of groups that user belongs to. Up to *ngroups of these groups are return
