Пример #1
0
 public ComplexNumber Subtract(ComplexNumber n1, ComplexNumber n2)
 {
     //Return the derived type
     return(new ComplexNumberWithMagnitude(n1.Real - n2.Real, n1.Imaginary - n2.Imaginary));
 }
Пример #2
0
 public ComplexNumber Add(ComplexNumber n1, ComplexNumber n2)
 {
     //Return the derived type
     return(new ComplexNumberWithMagnitude(n1.Real + n2.Real, n1.Imaginary + n2.Imaginary));
 }