private static double ToRadians(double x, DegRadGrad drg) { double result = 0; switch (drg) { case DegRadGrad.Deg: result = DegreeConverter.DegToRad(x); break; case DegRadGrad.Rad: result = x; break; case DegRadGrad.Grad: result = DegreeConverter.GradToRad(x); break; default: Debug.Assert(false, "Parametar should be Deg, Rad or Grad"); break; } return(result); }
public static double Acsch(double x, DegRadGrad drg) { return(FromRadians(Asinh(1 / x, drg), drg)); }
public static double Atanh(double x, DegRadGrad drg) { return(FromRadians(Math.Log((1 + x) / (1 - x)) / 2, drg)); }
public static double Asech(double x, DegRadGrad drg) { return(FromRadians(Acosh(1 / x, drg), drg)); }
public static double Csch(double x, DegRadGrad drg) { return(2.0 / (Math.Pow(Math.E, ToRadians(x, drg)) - Math.Pow(Math.E, -ToRadians(x, drg)))); }
public static double Acosh(double x, DegRadGrad drg) { return(FromRadians(Math.Log(x + Math.Sqrt(x * x - 1)), drg)); }
public static double Tanh(double x, DegRadGrad drg) { return(Math.Tanh(ToRadians(x, drg))); }
public static double Coth(double x, DegRadGrad drg) { return(Cosh(ToRadians(x, drg), drg) / Sinh(ToRadians(x, drg), drg)); }
public static double Acsc(double x, DegRadGrad drg) { return(FromRadians(Math.Asin(1.0 / x), drg)); }
public static double Asec(double x, DegRadGrad drg) { return(FromRadians(Math.Acos(1.0 / x), drg)); }
public static double Atan2(double y, double x, DegRadGrad drg) { return(FromRadians(Math.Atan2(y, x), drg)); }
public static double Csc(double x, DegRadGrad drg) { return(1.0 / Math.Sin(ToRadians(x, drg))); }
public static double Sec(double x, DegRadGrad drg) { return(1.0 / Math.Cos(ToRadians(x, drg))); }