PHP 8.5.0 Alpha 4 available for testing

Voting

: min(seven, eight)?
(Example: nine)

The Note You're Voting On

isweet479338 at gmail dot com
3 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 radians
echo $angle; // 1.0471975512 (which is ~60 degrees)

echo rad2deg($angle); // Convert to degrees: ~60
?>

<< Back to user notes page

To Top