Mono Class Library: System.Math Overview | Members

System.Math.Sin Method

Returns the sine of the specified double that represents an angle. [Edit]

public static double Sin (double a)

Parameters

a
A double containing the value of an angle measured in radians. [Edit]

Returns

A double containing the value of the sine of a. If a is equal to double.NaN, double.NegativeInfinity, or double.PositiveInfinity, returns double.NaN. [Edit]

Remarks

Note: Multiply by pi/180 to convert degrees to radians.
[Edit]

Example

The following example demonstrates using the Math.Sin(double) method.

C# Example
using System;

public class MathSinExample
{

   public static void Main()
   {

      Double d1 = Math.Sin(0);
      Double d2 = Math.Sin(Math.PI/2.0);
      Console.WriteLine("Math.Sin(0) returns {0}", d1);
      Console.WriteLine("Math.Sin(Math.PI/2.0) returns {0}", d2);

   }

}

The output is

Math.Sin(0) returns 0
Math.Sin(Math.PI/2.0) returns 1

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0