Double - Cosh
Returns the hyperbolic cosine of the specified angle.
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 - Cosh Console.WriteLine("Cosh({0}) = {1}", value, radians.Cosh()); } }
View Source
using System; public static partial class Extensions { /// <summary> /// Returns the hyperbolic cosine of the specified angle. /// </summary> /// <param name="value">An angle, measured in radians.</param> /// <returns>The hyperbolic cosine of . If is equal to or , is returned. If is equal to , is returned.</returns> public static Double Cosh(this Double value) { return Math.Cosh(value); } }