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
0
isweet479338 at gmail dot com
4 months ago
Parameter:$num: A float value between -1 and 1. (Outside this range will return NAN)Returns:The arc cosine of the number in radians.NAN (Not A Number) if the input is outside [-1, 1].<?php$cosValue = 0.5;$angle = acos($cosValue); // returns angle in radiansecho $angle; // 1.0471975512 (which is ~60 degrees)echo rad2deg($angle); // Convert to degrees: ~60?>
To Top