餘弦

cos

(PHP 4, PHP 5, PHP 7, PHP 8)

cos餘弦

說明

cos(float $arg): float

cos() 返回參數 arg 的餘弦值。參數 arg 的單位為弧度。

參數

arg

以弧度表示的角度

返回值

arg的餘弦值

範例

示例 #1 cos() 例子

<?php

echo cos(M_PI); // -1

?>

參見

Leave a Reply

Your email address will not be published. Required fields are marked *