public override Complex Div(Complex z) { CartesianComplex w = new CartesianComplex(this.re * z.Re + this.im * z.Im, this.im * z.Re - this.re * z.Im); w.re /= z.Norm(); w.im /= z.Norm(); return(w); }
} //Main static void Show(Complex z, Complex w) { Console.Write("z = {0}, w = {1}\n", z, w); Console.Write("|z| = {0}, ", z.Abs); Console.Write("||z|| = {0}\n", z.Norm()); Console.Write("∠z = {0}\n", z.Arg); Console.Write("+z = {0}, ", +z); Console.Write("-z = {0}, ", -z); Console.Write("~z = {0}\n", ~z); Console.Write("z + w = {0}, ", z + w); Console.Write("z - w = {0}\n", z - w); Console.Write("z * w = {0}, ", z * w); Console.Write("z / w = {0}\n", z / w); }
}//Main static void Show(Complex z, Complex w) { Console.Write("z = {0}, w = {1}\n", z, w); Console.Write("|z| = {0}, ", z.Abs); Console.Write("||z|| = {0}\n", z.Norm()); Console.Write("∠z = {0}\n", z.Arg); Console.Write("+z = {0}, ", +z); Console.Write("-z = {0}, ", -z); Console.Write("~z = {0}\n", ~z); Console.Write("z + w = {0}, ", z + w); Console.Write("z - w = {0}\n", z - w); Console.Write("z * w = {0}, ", z * w); Console.Write("z / w = {0}\n", z / w); }
public override Complex Div(Complex z) { CartesianComplex w = new CartesianComplex(this.re * z.Re + this.im * z.Im, this.im * z.Re - this.re * z.Im); w.re /= z.Norm(); w.im /= z.Norm(); return w; }