示例#1
0
 public static NumberValue Mul(ComplexValue a, ComplexValue b)
 {
     return(new ComplexValue(a.Engine, a.Real * b.Real + (a.Imag * b.Imag).Neg(), a.Real * b.Imag + a.Imag * b.Real));
 }
示例#2
0
 public static NumberValue Add(ComplexValue a, ComplexValue b)
 {
     return(new ComplexValue(a.Engine, a.Real + b.Real, a.Imag + b.Imag));
 }