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

TestStaticFn_Dot_i() private method

private TestStaticFn_Dot_i ( ) : void
return void
        public void TestStaticFn_Dot_i ()
        {
            for(Int32 i = 0; i < 100; ++i)
            {
                Vector4 a = GetNextRandomVector4();
                Vector4 b = GetNextRandomVector4();

                Double expected =
                    (a.X * b.X) + (a.Y * b.Y) + (a.Z * b.Z) + (a.W * b.W);

                Double result; Vector4.Dot(ref a, ref b, out result);

                Assert.That(result, Is.EqualTo(expected));
            }
        }
Vector4Tests