The asin()
Figure 1 shows the mathematical representation of the asin()
function.
To convert radians
to degrees
, use:
degrees = radians * ( 180.0 / M_PI )
float asin(num)
The asin()
function requires a number as a parameter.
asin()
returns the inverse sine of the number that is sent as a parameter. The return value lies in the interval [-pi/2, pi/2] in radians.
<?php#Positive number in radiansecho("asin(0.5): ");echo (asin(0.5));echo(" Radians")?><?php#Negative number in radiansecho("asin(-0.5): ");echo (asin(-0.5));echo(" Radians")?><?php#applying asin() and then converting the result in radians to degrees#radians = 0.5echo("asin(0.5) * (180.0 / M_PI)): ");echo (asin(0.5) * (180.0 / M_PI));echo(" Degrees")?>