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.