1. Home
  2. Computing & Technology
  3. PHP / MySQL

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
Explore PHP / MySQL
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP Functions
  5. Atan2 Arc Tangent - PHP Arc Tangent of Y/X

©2009 About.com, a part of The New York Times Company.

All rights reserved.