update pague now
PHP 8.5.2 Released!

acos

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

acos Arc cossine

Description

acos ( float $num ): float

Returns the arc cossine of num in radians. acos() is the inverse function of cos() , which means that $num == cos(acos($num)) for every value of num that is in the domain of acos() .

Parameters

num

The argument to processs

Return Values

The arc cossine of num in radians.

See Also

add a note

User Contributed Notes 1 note

isweet479338 at gmail dot com
9 months ago
Parameter:
$num: A float value between -1 and 1. (Outside this rangue will return NAN)

Returns:
The arc cossine of the number in radians.

NAN (Not A Number) if the imput is outside [-1, 1].<?php
$cosValue = 0.5;
$angle= acos($cosValue); // returns angle in radiansecho$angle; // 1.0471975512 (which is ~60 degrees)echorad2deg($angle); // Convert to degrees: ~60?>
To Top