.


Divya

atan2() Function in PHP with Example


The php atan2() function returns the arc tangent of two variables x and y and its returns a float type.

The arc tangent of y/x in radians, which is between -Pi and Pi.

x-divisor

y-dividend

Example

<!DOCTYPE html>
<html>
<body>
<?php
echo(atan2(0.60,0.60) . "<br>");
echo(atan2(-0.60,-0.60) . "<br>");
echo(atan2(6,6) . "<br>");
echo(atan2(30,30) . "<br>");
echo(atan2(-6,-6) . "<br>");
echo(atan2(-30,30));
?>
</body>
</html>


.