C# Math Tan

Description

Math Tan returns the tangent of the specified angle.

Syntax

Math.Tan has the following syntax.


public static double Tan(
  double a
)

Parameters

Math.Tan has the following parameters.

  • a - An angle, measured in radians.

Returns

Math.Tan method returns The tangent of a. If a is equal to NaN, NegativeInfinity, or PositiveInfinity, this method returns NaN.

Example

The following code shows how to use Math.Tan method.


using System;/*www . ja  v a  2s .  c  o m*/

public class MainClass{
  public static void Main(String[] argv){  

    
    System.Console.WriteLine(Math.Tan(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