1. Computing & Technology

Discuss in my forum

Atan () PHP Function

By , About.com Guide

Definition: The Atan () Function finds the arctangent of a number. In Atan (X), the value of X can be any positive or negative number, and the result will be between PI/2 and -PI/2. The function will returns the angle, expressed in radians, whose tangent is X.
Also Known As: Arctangent, Arc tangent
Examples:
 <?php 
 echo(atan(-0.5) . "<br />"); 
 echo(atan(-1) . "<br />"); 
 echo(atan(0) . "<br />"); 
 echo(atan(1) . "<br />"); 
 echo(atan(2)) 
 ?>
 

This will give you the results:
-0.46364760900081
-0.78539816339745
0
0.78539816339745
1.1071487177941

©2012 About.com. All rights reserved.

A part of The New York Times Company.