PHP asin()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

Returns the arcsine 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));
?>

Run example »

Definition and Usage

The asin() function returns the arcsine of a number.

Tip:asin(1) returns the value of Pi/2.


Syntax

asin(number);

Parameter Description
number Required. Specifies a number in the range -1 to 1.

Technical Details

Return value: numberThe arcsine of. Ifnumbernot in the range -1 to 1, returns NAN.
Return type: Float
PHP Version: 4+


PHP Math 参考手册PHP Math Reference Manual Other Extensions