Name
cos()
Synopsis
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));
Get PHP in a Nutshell 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.