Abacus.DoublePrecision.Vector2Tests.TestStaticFn_Reflect_ii C# (CSharp) Method

TestStaticFn_Reflect_ii() private method

private TestStaticFn_Reflect_ii ( ) : void
return void
        public void TestStaticFn_Reflect_ii ()
        {
            for( Int32 i = 0; i < 100; ++ i)
            {
                Vector2 a = GetNextRandomVector2();

                Vector2 b = GetNextRandomVector2();

                Vector2.Normalise(ref b, out b);

                Vector2 result;
                Vector2.Reflect(ref a, ref b, out result);

                Double dot;
                Vector2.Dot(ref a, ref b, out dot);

                Vector2 expected = a - (2 * dot * b);

                AssertEqualWithinReason(result, expected);
            }
        }
Vector2Tests