PHP asin()
Published Jun 6, 2023
The asin() function returns the arc sine of a number between -1 and 1.
Syntax
asin(number)
The asin() function takes only one parameter, number, a number between -1 and 1 of type float. The function returns the arc sine of the number in radians as a float value.
If the number is outside of the range of -1 to 1, the function returns NAN (not a number).
Codebyte Examples
The codebyte example below uses the asin() function to return the arc sine of 2 and -1:
Learn PHP on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours