How to use cos in PHP
This article describe about cos() Function in PHP.
cos() Function
The cosine of number return by the cos() function.
Syntax
Parameter |
Description |
x |
Required a number |
Note: This function return numeric value between -1 to 1 only.
Example
<html>
<body>
<?php
echo(cos(5) . "<br />");
echo(cos(-5) . "<br />");
echo(cos(0) . "<br />");
echo(cos(M_PI) . "<br />");
echo(cos(3*M_PI))
?>
</body>
</html> |
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here