.Asin()
Anonymous contributor
Published Mar 15, 2023Updated Nov 7, 2024
Contribute to Docs
The Math.Asin() method computes an angle in radians whose sine is a specified number. In Math, this is known as the inverse sine function.
Syntax
Math.Asin(value);
value
is the input value of type double, which must be in the range -1 <= value
<= 1.
Returns an angle measured in radians, of type double
, whose sine is value
. If an invalid value is passed to the function, or no value is passed at all, NaN
is returned.
Example
The following example prints the results of the Math.Asin()
method for three different values:
using System;public class Example{static void Main(){double a = Math.Asin(0.5);double b = Math.Asin(1);double c = Math.Asin(-2);Console.WriteLine(a);Console.WriteLine(b);Console.WriteLine(c);}}
This results in the following output:
0.5235987755982991.5707963267949NaN
Codebyte Example
Contribute to Docs
- 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.
Learn C# on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Free course
Learn C#
Learn Microsoft's popular C# programming language, used to make websites, mobile apps, video games, VR, and more.Beginner Friendly23 hours