acos()
Published Jun 15, 2023Updated Jul 20, 2023
Contribute to Docs
The built-in math function acos()
determines the arc cosine
of a given value. The inverse cosine function, which is used to identify the angle whose cosine value is equal to the specified value, is referred to as the arc cosine
function.
Syntax
$result = acos(number);
Where number
is the number that the function returns the arc cosine for. Should be specified in range -1 to 1.
Example
<?phpecho(acos(0.64));?>
The result will be a float value of 0.87629806116834
.
Note:
acos(-1)
returns the value of Pi,π
.
Codebyte Example
The acos()
function returns the arc cosine of the given number as a float value in radians.
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.