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

TestNegation() private method

Helper method for testing negation.
private TestNegation ( System.Vector2 a, System.Vector2 expected ) : void
a System.Vector2
expected System.Vector2
return void
        void TestNegation (Vector2 a, Vector2 expected )
        {
            // This test asserts the following:
            //   -a == expected

            var result_1a = -a;

            Vector2 result_1b; Vector2.Negate(ref a, out result_1b);

            Assert.That(result_1a, Is.EqualTo(expected));
            Assert.That(result_1b, Is.EqualTo(expected));
        }
Vector2Tests