Returns the arccosines of distinct numbers:
<?phpecho(acos(0.64) . "<br>");echo(acos(-0.4) . "<br>");echo(acos(0) . "<br>");echo(acos(-- 1) . "<br>");echo(acos(1) . "<br>");echo(acos(2));?>The acos() function returns the arc cosine of a number.
Tip: acos(-1) returns the value of Pi.
acos( number );
| parameter | describe |
|---|---|
| number | Required. Specifies a number ranging from -1 to 1. |
| Return value: | The arc cosine of number . If number is not in the range -1 to 1, NAN is returned. |
|---|---|
| Return type: | Float |
| PHP version: | 4+ |