English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Thecos()
The function returns the cosine value of a number. The return value is between-1and1The numbers between indicate the cosine of the angle.
cos(num)
num-the specified value in radians
Thecos()
the function returns the cosine value as a floating-point number. The return value is between-1and1The numbers between indicate the cosine of the angle.
<?php echo(cos(1)) . "<br>"; echo(cos(-1)); ?>
Output Result
0.54030230586814<br>0.54030230586814
Let's look at another example-
<?php echo(cos(0)); ?>
Output Result
1