asin()
ajay_gonepuri2 total contributions
Published Oct 29, 2023
Contribute to Docs
The asin()
function returns the arcsine of a number.
Syntax
asin(x)
The function accepts one mandatory parameter x
. It should be a numeric value in the range between -1
and 1
(inclusive). The argument can be of Double
, and Float
datatype.
It returns the arcsine of the argument, which represents an angle in radians. The return value will be of the same type as the argument.
Example
The example below demonstrates how to use asin() method to return the arcsine of 0.5
.
import kotlin.math.asinfun main() {// Calculate the arcsine of 0.5val result = asin(0.5)// Print the resultprintln(result)}
The output will be:
0.5235987755982989
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.