Abacus.DoublePrecision.Vector4Tests.TestMultiplication C# (CSharp) Method

TestMultiplication() private method

Helper method for testing multiplication.
private TestMultiplication ( System.Vector4 a, System.Vector4 b, System.Vector4 expected ) : void
a System.Vector4
b System.Vector4
expected System.Vector4
return void
        void TestMultiplication (Vector4 a, Vector4 b, Vector4 expected )
        {
            // This test asserts the following:
            //   a * b == expected
            //   b * a == expected

            var result_1a = a * b;
            var result_2a = b * a;

            Vector4 result_1b; Vector4.Multiply(ref a, ref b, out result_1b);
            Vector4 result_2b; Vector4.Multiply(ref b, ref a, out result_2b);

            Assert.That(result_1a, Is.EqualTo(expected));
            Assert.That(result_2a, Is.EqualTo(expected));
            Assert.That(result_1b, Is.EqualTo(expected));
            Assert.That(result_2b, Is.EqualTo(expected));
        }
Vector4Tests