← All built-ins / cos()
cos()
cos(mixed $number): float
Parameters
| Name | Type | Description |
|---|---|---|
| $number | float|int | angle in radians |
Return value
Cosine as float.
Example
echo round(cos(0), 3), " ", round(cos(M_PI), 3);
1 -1
| Name | Type | Description |
|---|---|---|
| $number | float|int | angle in radians |
Cosine as float.
echo round(cos(0), 3), " ", round(cos(M_PI), 3);
1 -1