asin():

asin(X);
X is the angular value in radian. We get output as ARC SIN of the input angle. It is X==sin(asin(X))

It takes input range from +1 to -1 , for any other input it returns NAN ( not a number )
<?Php
echo asin(0); // Output is 0
echo "<br>";
echo asin(1); // Output  1.5707963267949
echo "<br>";
echo asin(-1); // Output is -1.5707963267949
echo "<br>";
echo asin(4); // Output is NAN 
?>

deg2rad() with asin()

We can use deg2rad() to convert Degree value to radian and then use asin().
<?Php
echo asin(deg2rad(0)); // 0
echo "<br>";
echo asin(deg2rad(1)); // 0.017454178737585
echo "<br>";
echo asin(deg2rad(-1)); // -0.017454178737585
?>

Plotting of SIN & SIN curves by using PHP GD function with deg2rad()

Your Rating





Post Comment This is for short comments only. Use the forum for more discussions.




HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer