p5.js | asin() function
The asin() function in p5.js is used to calculate the inverse of sine (arc sine). If the input value range is -1 to 1 then it returns the range between -π/2 to π/2.
Parameters: This function accepts a single parameter value which stores the domain of asin() function.
Return Value: It returns the arc sine of given value.
Below program illustrates the asin() function in p5.js:
Example: This example uses asin() function to get arc sine of a value.
Note: If the value is greater than 1 or less than -1 then it returns NaN.