![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MathF.Asin() Method in C# with Examples
The MathF.Asin() method in C# is used to return the angle whose sine is a float value argument.
Syntax
Following is the syntax −
public static float Asin (float val);
Above, Val is the float value.
Example
Let us now see an example to implement the MathF.Asin() method −
using System; public class Demo { public static void Main(){ float val1 = 0.1f; float val2 = 8.9f; Console.WriteLine("Angle (val1) = "+(MathF.Asin(val1))); Console.WriteLine("Angle (val2) = "+(MathF.Asin(val2))); } }
Output
This will produce the following output −
Angle (val1) = 0.1001674 Angle (val2) = NaN
Example
Let us now see another example to implement the MathF.Asin() method −
using System; public class Demo { public static void Main(){ float val1 = 1.2f; float val2 = 45.5f; Console.WriteLine("Angle (val1) = "+(MathF.Asin(val1))); Console.WriteLine("Angle (val2) = "+(MathF.Asin(val2))); } }
Output
This will produce the following output −
Angle (val1) = NaN Angle (val2) = NaN
Advertisements