Norm() public abstract méthode

絶対値の二乗を返す
public abstract Norm ( ) : double
Résultat double
Exemple #1
0
        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);
        }
Exemple #2
0
        }               //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);
        }
Exemple #3
0
		}//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;
		}