©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
(PHP 4, PHP 5)
cos — 余弦
$arg
) cos() 返回参数 arg
的余弦值。参数 arg
的单位为弧度。
arg
以弧度表示的角度
arg
的余弦值
Example #1 cos() 例子
<?php
echo cos ( M_PI ); // -1
?>
[#1] shrinivasmani at gmail dot com [2013-10-15 11:57:37]
Convert degree to radianus
<?php
// Degree
$degree = 360;
// Convertion
print cos(deg2rad($degree));
?>
[#2] felipensp at gmail dot com [2006-03-12 05:29:43]
Convert degree to radianus, radianus to cos.
<?php
// Degree
$degree = 360;
// Convertion
print cos(deg2rad($degree));
?>