October 2005
Intermediate to advanced
372 pages
11h 35m
English
cos()
float cos ( float num )The cos()
function calculates the cosine value of the number provided as its only parameter. The parameter should be passed as radians—you should use deg2rad() to convert degrees to radians.
$cos1 = cos(10);
$cos2 = cos(deg2rad(80));