PHP 8.3.0 RC 6 available for testing

acos

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

acos反余弦

说明

acos(float $num): float

返回 num 的反余弦值,单位是弧度。acos()cos() 的反函数,它的意思是在 acos() 范围里的每个值都是 $num == cos(acos($num))

参数

num

要处理的参数

返回值

num 的反余弦弧度。

参见

add a note

User Contributed Notes 1 note

up
-17
rahmatjon at gmail dot com
2 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