Exemple #1
0
        /// <summary>
        /// Вычитание комплексных чисел
        /// </summary>
        /// <param name="x2"></param>
        /// <returns></returns>
        public ComplexCl Minus(ComplexCl x2)
        {
            ComplexCl x3 = new ComplexCl();

            x3.im = x2.im - this.im;
            x3.re = x2.re - this.re;
            return(x3);
        }
Exemple #2
0
        /// <summary>
        /// Произведение комплексных чисел
        /// </summary>
        /// <param name="x2"></param>
        /// <returns></returns>
        public ComplexCl Multi(ComplexCl x2)
        {
            ComplexCl x3 = new ComplexCl();

            x3.im = x2.re * this.im + x2.im * this.re;
            x3.re = x2.re * this.re - x2.im * this.im;
            return(x3);
        }
Exemple #3
0
        /// <summary>
        /// Суммма комплексных чисел
        /// </summary>
        /// <param name="x2"></param>
        /// <returns></returns>
        public ComplexCl Plus(ComplexCl x2)
        {
            ComplexCl x3 = new ComplexCl();

            x3.im = x2.im + this.im;
            x3.re = x2.re + this.re;
            return(x3);
        }