How to use atan2 in PHP

This article describe about atan2() Function in PHP.
  • 1321

atan2() Function

The angle theta of an (x,y) point as a numeric value between -PI and PI radians return by the atan2() function.

Syntax

atan2(a)

 

Parameter Description
a Required. A number

Example

<html>
<body>
<?php
echo(atan2(0.60,0.60) . "<br />");
echo(atan2(-0.60,-0.60) . "<br />");
echo(atan2(6,6) . "<br />");
echo(atan2(12,24) . "<br />");
echo(atan2(-6,-6) . "<br />");
echo(atan2(-12,12))
?>
</body>
</html>

 

Output


atan2php.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.