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.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version