English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

atan in PHP2function ()

atan2The () function returns the arctangent of two variables.

syntax

atan2(val1, val2)

parameter

  • val1-divisor

  • val2-dividend

returns

atan2The () function returns val in radians2 / val1The inverse tangent. The return value is in-Between Pi and Pi.

Example

<?php
   echo(atan2(30,30) . "<br>");
   echo(atan2(2,2) . "<br>");
?>

Output Result

0.78539816339745<br>0.78539816339745<br>

Example

Let's see another example-

<?php
   echo(atan2(-15,-15) . "<br>");
   echo(atan2(-0.90,-0.70) . "<br>");
?>

Output Result

-2.3561944901923<br>-2.2318394956456<br>