1. Computing

Discuss in my forum

Acos () PHP Function

By , About.com Guide

Definition: The acos () function is used in PHP to find the arccosine of a number. In acos (x) the value of x should be between -1 and 1, with -1 returning a value of PI. The acos() function returns the arccosine of a number as a numeric value value between 0 and PI radians.
Also Known As: Arccosine
Examples:
 <?php
 echo(acos(-0.5) . "<br />");
 echo(acos(-1) . "<br />");
 echo(acos(0) . "<br />");
 echo(acos(1) . "<br />");
 echo(acos(2))
 ?> 
This will give you the results:
2.0943951023932
3.1415926535898
1.5707963267949
0
NAN
  1. About.com
  2. Computing
  3. PHP / MySQL
  4. PHP Functions
  5. Acos PHP Function - Arccosine PHP Function - PHP Math Function

©2013 About.com. All rights reserved.