acos(X);
X is the angular value in radian. We get output as acos of the input angle. <?Php
echo acos(0); // Output is 1.5707963267949
echo "<br>";
echo acos(1); // Output 0
echo "<br>";
echo acos(-1); // Output is 3.1415926535898
echo "<br>";
echo acos(-5); // Output is NAN
?>
<?Php
echo acos(deg2rad(0)); // 1.5707963267949
echo "<br>";
echo acos(deg2rad(90)); // NAN
echo "<br>";
echo acos(deg2rad(180)); // NAN
?>
Plotting of SIN & SIN curves by using PHP GD function with deg2rad()