Ejemplo n.º 1
0
        public ComplexStruct Minus(ComplexStruct x) //а) Вычитание комплексных чисел
        {
            ComplexStruct y;

            y.im = x.im - im;
            y.re = x.re - re;
            return(y);
        }
Ejemplo n.º 2
0
        public ComplexStruct Multi(ComplexStruct x)
        {
            ComplexStruct y;

            y.im = re * x.im + im * x.re;
            y.re = re * x.re - im * x.im;
            return(y);
        }
Ejemplo n.º 3
0
        public ComplexStruct Plus(ComplexStruct x)
        {
            ComplexStruct y;

            y.im = im + x.im;
            y.re = re + x.re;
            return(y);
        }