array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.atan2.php', 1 => 'atan2', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Math Functions', ), 'prev' => array ( 0 => 'function.asinh.php', 1 => 'asinh', ), 'next' => array ( 0 => 'function.atan.php', 1 => 'atan', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/math/functions/atan2.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
atan2 — Arc tangent of two variables
This function calculates the arc tangent of the two variables
x
and y
. It is
similar to calculating the arc tangent of
y
/ x
, except that
the signs of both arguments are used to determine the quadrant of
the result.
The function returns the result in radians, which is between -PI and PI (inclusive).
y
Dividend parameter
x
Divisor parameter
The arc tangent of y
/x
in radians.