If you want to get cosine of the arg parameter(in radian) then use cos() function.
PHP cos() Function Example:
If you want to get cosine of the arg parameter(in radian) then use cos() function.
Syntax:
cos(x)
where x is required parameter in radian.
Example:
<?php echo (cos(-5)."<br />"); echo (cos(0) . "<br />"); echo (cos(-1) . "<br />"); echo (cos(1) . "<br />"); echo (cos(5)); ?>
After running this example the output is:
Output:
0.28366218546323 1 0.54030230586814 0.54030230586814 0.28366218546323
[ 0 ] Comments