System.Numerics.Tests.ComplexTests.Multiply C# (CSharp) Метод

Multiply() приватный Метод

private Multiply ( double realLeft, double imaginaryLeft, double realRight, double imaginaryRight ) : void
realLeft double
imaginaryLeft double
realRight double
imaginaryRight double
Результат void
        public static void Multiply(double realLeft, double imaginaryLeft, double realRight, double imaginaryRight)
        {
            var left = new Complex(realLeft, imaginaryLeft);
            var right = new Complex(realRight, imaginaryRight);

            double expectedReal = realLeft * realRight - imaginaryLeft * imaginaryRight;
            double expectedImaginary = realLeft * imaginaryRight + imaginaryLeft * realRight;

            // Operator
            Complex result = left * right;
            VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);

            // Static method
            result = Complex.Multiply(left, right);
            VerifyRealImaginaryProperties(result, expectedReal, expectedImaginary);
        }
        
ComplexTests