Convert degree to radianus, radianus to cos.
<?php
// Degree
$degree = 360;
// Convertion
print cos(deg2rad($degree));
?>
cos
(PHP 4, PHP 5)
cos — Cosine
Açıklama
float cos
( float
$arg
)
cos() returns the cosine of the arg
parameter. The arg parameter is in radians.
Değiştirgeler
-
arg -
An angle in radians
Dönen Değerler
The cosine of arg
Örnekler
Örnek 1 cos() example
<?php
echo cos(M_PI); // -1
?>
felipensp at gmail dot com ¶
7 years ago
