C# - Math Asin() Method
The C# Math Asin() method returns arc sine of a value. The return value will be in the range -𝜋/2 through 𝜋/2. In special cases it returns the following:
- If the argument is NaN or its absolute value is greater than 1, the method returns NaN.
Note: Asin() is the inverse of sin().
Syntax
public static double Asin(double arg);
Parameters
arg |
Specify the value. |
Return Value
Returns the arc sine of the value.
Example:
In the below example, Asin() method is used to find out the arc sine of a given value.
using System; class MyProgram { static void Main(string[] args) { Console.WriteLine(Math.Asin(0.5)); Console.WriteLine(Math.Asin(1)); Console.WriteLine(Math.Asin(2)); } }
The output of the above code will be:
0.523598775598299 1.5707963267949 NaN
❮ C# Math Methods