Beispiel #1
0
 // Constructor
 public Complex(Real real, Real imaginary)
 {
     this.real      = real;
     this.imaginary = imaginary;
 }
Beispiel #2
0
 /// <summary>
 ///     <remarks>
 ///         Attempts to provide a unique integer code for this complex object. The method employed here
 ///         is to use the exclusive or (XOR) of the two hash code integers obtained from the real and
 ///         imaginary parts of this number.  It should be obvious that this will not always provide a
 ///         unique hash code and so should be used reservedly.
 ///     </remarks>
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode() => Real.GetHashCode() ^ Imag.GetHashCode();