Ejemplo n.º 1
0
 // Overrides needed for testing
 public static void AssertEqualty(ComplexNumber n1, ComplexNumber n2, String errormsg = "Error while asserting equalty.")
 {
     Assert.AreEqual(n1.real, n2.real, errormsg);
     Assert.AreEqual(n1.imaginary, n2.imaginary, errormsg);
 }
Ejemplo n.º 2
0
 //共轭复数的计算
 private static ComplexNumber GetConjugateComplex(ComplexNumber src)
 {
     return(new ComplexNumber(src.real, -src.imaginary));
 }