Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Tan()

static Complex System.Numerics.Complex.Tan ( Complex value)
inlinestatic

Definition at line 423 of file Complex.cs.

424 {
425 double num = 2.0 * value.m_real;
426 double num2 = 2.0 * value.m_imaginary;
427 double num3 = Math.Exp(num2);
428 double num4 = 1.0 / num3;
429 double num5 = (num3 + num4) * 0.5;
430 if (Math.Abs(value.m_imaginary) <= 4.0)
431 {
432 double num6 = (num3 - num4) * 0.5;
433 double num7 = Math.Cos(num) + num5;
434 return new Complex(Math.Sin(num) / num7, num6 / num7);
435 }
436 double num8 = 1.0 + Math.Cos(num) / num5;
437 return new Complex(Math.Sin(num) / num5 / num8, Math.Tanh(num2) / num8);
438 }
Complex(double real, double imaginary)
Definition Complex.cs:38

References System.Numerics.Complex.Complex(), System.Math.Abs(), System.Math.Cos(), System.Math.Exp(), System.Math.Sin(), System.Math.Tanh(), and System.value.

Referenced by System.Numerics.Complex.Tanh().