// C# Extension Method
// Doc: https://csharp-extension.com/en/method/1002323/double-atan
// @nuget: Z.ExtensionMethods
using System;
public class Program
{
public static void Main()
double angle;
double radians;
double result;
// Calculate the tangent of 30 degrees.
angle = 30;
radians = angle * (Math.PI / 180);
// C# Extension Method: Double - Tan
result = radians.Tan();
Console.WriteLine("The tangent of 30 degrees is {0}.", result);
// Calculate the arctangent of the previous tangent.
// C# Extension Method: Double - Atan
radians = result.Atan();
angle = radians * (180 / Math.PI);
Console.WriteLine("The previous tangent is equivalent to {0} degrees.", angle);
}