Get the arc tangent of two variables with the atan2() function in PHP

Description

The following code shows how to get the arc tangent of two variables with the atan2() function.

Example


/*from www .j av  a2 s  .  c  o m*/
<?php
    echo(atan2(0.50,0.50) . "<br>");
    echo(atan2(-0.50,-0.50) . "<br>");
    echo(atan2(5,5) . "<br>");
    echo(atan2(10,20) . "<br>");
    echo(atan2(-5,-5) . "<br>");
    echo(atan2(-10,10));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions