PHP asin() Function
Example
Return the arc sine of different numbers:
<?php
echo(asin(0.64) . "<br>");
echo(asin(-0.4) . "<br>");
echo(asin(0) . "<br>");
echo(asin(-1) . "<br>");
echo(asin(1) . "<br>");
echo(asin(2));
?>
Try it Yourself »
Definition and Usage
The asin() function returns the arc sine of a number.
Tip: asin(1) returns the value of Pi/2.
Syntax
asin(number);
Parameter Values
Parameter | Description |
---|---|
number | Required. Specifies a number in range -1 to 1 |
Technical Details
Return Value: | The arc sine of a number. Returns NAN if number is not in the range -1 to 1 |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
❮ PHP Math Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.