Beispiel #1
0
 public static Complex operator *(Complex a, Complex b)
 {
     return(Complex.Multiply(a, b));
 }
Beispiel #2
0
 public static Complex operator *(Complex a, double s)
 {
     return(Complex.Multiply(a, s));
 }
Beispiel #3
0
 public static Complex Subtract(double s, Complex a)
 {
     return(new Complex(s - a.Re, a.Im));
 }
Beispiel #4
0
 public static void Multiply(Complex a, double s, ref Complex result)
 {
     result.Re = a.Re * s;
     result.Im = a.Im * s;
 }
Beispiel #5
0
 public static void Add(Complex a, Complex b, ref Complex result)
 {
     result.Re = a.Re + b.Re;
     result.Im = a.Im + b.Im;
 }
Beispiel #6
0
 public static Complex Subtract(Complex a, Complex b)
 {
     return(new Complex(a.Re - b.Re, a.Im - b.Im));
 }
Beispiel #7
0
 public static Complex operator +(Complex a, Complex b)
 {
     return(Complex.Add(a, b));
 }
Beispiel #8
0
 public static Complex operator /(double s, Complex a)
 {
     return(Complex.Divide(s, a));
 }
Beispiel #9
0
 public Complex(Complex c)
 {
     this.Re = c.Re;
     this.Im = c.Im;
 }
Beispiel #10
0
 public static Complex operator -(Complex a)
 {
     return(Complex.Negate(a));
 }
Beispiel #11
0
 public static bool ApproxEqual(Complex a, Complex b, double tolerance)
 {
     return((System.Math.Abs(a.Re - b.Re) <= tolerance) && (System.Math.Abs(a.Im - b.Im) <= tolerance));
 }
Beispiel #12
0
 public static bool ApproxEqual(Complex a, Complex b)
 {
     return(ApproxEqual(a, b, 8.8817841970012523233891E-16));
 }
Beispiel #13
0
 public static Complex Negate(Complex a)
 {
     return(new Complex(-a.Re, -a.Im));
 }
Beispiel #14
0
 public static Complex operator /(Complex a, Complex b)
 {
     return(Complex.Divide(a, b));
 }
Beispiel #15
0
 public static Complex operator +(double s, Complex a)
 {
     return(Complex.Add(a, s));
 }
Beispiel #16
0
 public static Complex operator /(Complex a, double s)
 {
     return(Complex.Divide(a, s));
 }
Beispiel #17
0
 public static Complex Add(Complex a, Complex b)
 {
     return(new Complex(a.Re + b.Re, a.Im + b.Im));
 }
Beispiel #18
0
 public static Complex Add(Complex a, double s)
 {
     return(new Complex(a.Re + s, a.Im));
 }
Beispiel #19
0
 public static Complex operator -(Complex a, Complex b)
 {
     return(Complex.Subtract(a, b));
 }
Beispiel #20
0
 public static void Add(Complex a, double s, ref Complex result)
 {
     result.Re = a.Re + s;
     result.Im = a.Im;
 }
Beispiel #21
0
 public static Complex operator -(Complex a, double s)
 {
     return(Complex.Subtract(a, s));
 }
Beispiel #22
0
 public static Complex Subtract(Complex a, double s)
 {
     return(new Complex(a.Re - s, a.Im));
 }
Beispiel #23
0
 public static Complex operator -(double s, Complex a)
 {
     return(Complex.Subtract(s, a));
 }
Beispiel #24
0
 public static void Subtract(Complex a, Complex b, ref Complex result)
 {
     result.Re = a.Re - b.Re;
     result.Im = a.Im - b.Im;
 }
Beispiel #25
0
 public static Complex Multiply(Complex a, double s)
 {
     return(new Complex(a.Re * s, a.Im * s));
 }