1. Computing & Technology

Discuss in my forum

Atan2 () PHP Function

By , About.com Guide

Definition: We can use the Atan () function to figure out the arc tangent of a number. We can also use the Atan2 () function to figure out the arc tangent of a point given two coordinates. It is written as atan(Y,X) and calculates the arc tangent of Y/X. The result will always be between -PI and PI radians.
Also Known As: Arc Tangent, Arctangent
Examples:
 <?php
 echo(atan2(5,5) . "<br />");
 echo(atan2(-3,4))
 ?>

This will return:
0.78539816339745
-0.64350110879328
Related Searches php echo arc coordinates pi lt atan2

©2012 About.com. All rights reserved.

A part of The New York Times Company.