コード例 #1
0
            public void negative_values_produce_same_magnitude_squared()
            {
                var vector   = new Vector4F(0.1f, 2, 3, -4);
                var expected = vector.GetMagnitudeSquared();

                var actual = vector.GetNegative().GetMagnitudeSquared();

                Assert.Equal(expected, actual);
            }
コード例 #2
0
            public void can_get_magnitude_squared()
            {
                var vector   = new Vector4F(3.0f, 4, 5, 6);
                var expected = 86.0;

                var actual = vector.GetMagnitudeSquared();

                Assert.Equal(expected, actual);
            }