PHP asin() Function
Definition and Usage
The asin() function returns the inverse sine of different numerical values, and the result is an arc value between -PI/2 and PI/2.
Syntax
asin(x)
Parameter | Description |
---|---|
x | Required. A number, ranging between -1 and 1. |
Description
Returns x The inverse sine value, in radians. asin() is sin() is the inverse function, which means that each value within the range of asin() is a==sin(asin(a)).
If x If the value is outside the range of -1 to 1, it returns -1.#IND. If it is 1, it returns the value of PI/2.
Example
In this example, we will calculate the arcsine of different values:
<?php echo(asin(0.64)); echo(asin(0)); echo(asin(-1)); echo(asin(1)); echo(asin(2)) ?>
Output:
0.694498265627 0 -1.57079632679 1.57079632679 -1.#IND