array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.cos.php', 1 => 'cos', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Mathematische Funktionen', ), 'prev' => array ( 0 => 'function.ceil.php', 1 => 'ceil', ), 'next' => array ( 0 => 'function.cosh.php', 1 => 'cosh', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'de', 'path' => 'reference/math/functions/cos.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
cos — Kosinus
cos() berechnet den Kosinus des Winkels
num
. Der Parameter num
ist im
Bogenmaß.
num
Ein Winkel in Bogenmaß.
Der Kosinus des Winkels num
.
Beispiel #1 cos()-Beispiel
<?php
echo cos(M_PI); // -1
?>