Double - Tan

Returns the tangent of the specified angle.

Try it

public static void Main()
{
	double[] doubles = { 0, 45, 90, 180 };
	
  	foreach (double value in doubles)
	{
		double radians = (value * (Math.PI)) / 180;
		
		// C# Extension Method: Double - Tan
    	Console.WriteLine("Tan({0}) = {1}", value, radians.Tan());
	}
}

View Source
using System;

public static partial class Extensions
{
    /// <summary>
    ///     Returns the tangent of the specified angle.
    /// </summary>
    /// <param name="a">An angle, measured in radians.</param>
    /// <returns>The tangent of . If  is equal to , , or , this method returns .</returns>
    public static Double Tan(this Double a)
    {
        return Math.Tan(a);
    }
}