CakeFest 2024: The Official CakePHP Conference

acos

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

acos逆余弦(アークコサイン)

説明

acos(float $num): float

num のアークコサインをラジアンで返します。 acos()cos() の逆関数です。 つまり、acos() の定義域にある num の全ての値に対して、$num == cos(acos($num)) が成立します。

パラメータ

num

処理する角度。

戻り値

num のアークコサインをラジアンで返します。

参考

  • cos() - 余弦(コサイン)
  • acosh() - 逆双曲線余弦(アークハイパボリックコサイン)
  • asin() - 逆正弦(アークサイン)
  • atan() - 逆正接(アークタンジェント)

add a note

User Contributed Notes 1 note

up
-19
rahmatjon at gmail dot com
3 years ago
Hello!
There is no any example for acos() function. Please put this one below the acos() function's description.
Thank you!

Example:
<?php
$arg
=0.5;
$val=acos($arg);
echo
"acos(" . $arg . ") = " . $val . " radians.<br/>";
echo
"Pi value = " . pi() . "<br/>";
echo
"acos(" . $arg . ") = " . $val/pi()*180 . " degrees<br/>";
?>
To Top