cos
float cos(float radians)
Returns the cosine for the given radians
value.
Returns:
Cosine of a value
Description:
Returns the cosine of the value given by radians , which as its name suggests is to be given in radians.
Version:
PHP 3, PHP 4
See also:
acos() asin() atan() atan2() sin() tan()
Example:
Calculate the cosine of a value
$rad = pi() / 2; echo "The cosine of $rad = ", cos($rad); |
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.