// 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); }
//共轭复数的计算 private static ComplexNumber GetConjugateComplex(ComplexNumber src) { return(new ComplexNumber(src.real, -src.imaginary)); }