C# Math Sin
Description
Math Sin
returns the sine of the specified angle.
Syntax
Math.Sin
has the following syntax.
public static double Sin(
double a
)
Parameters
Math.Sin
has the following parameters.
a
- An angle, measured in radians.
Returns
Math.Sin
method returns The sine of a. If a is equal to NaN, NegativeInfinity, or PositiveInfinity,
this method returns NaN.
Example
The following code shows how to use Math.Sin method.
using System;/*from w w w .j a v a 2 s .c om*/
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(Math.Sin(0.5));
}
}
The code above generates the following result.