Jump to: navigation, search

Php atan2

From w3cyberlearnings

Contents

PHP function atan2

This function returns the arc tangent of X and Y radians. It is similar to calculate the arc tangent of X/Y radians, the only different is that the signs of both numbers are used to determine the quadrant of the result.

Syntax atan2

  • X is the first number
  • Y is the second number
atan2(X,Y);

Example 1

<?php
<?php
echo atan2(2,2);
echo "<br/>";
echo atan2(2,-2);
?>

Output

0.78539816339745
2.3561944901923

Related Links


Navigation
Web
SQL
MISC
References