示例#1
0
            public void projecting_zero_against_another_vector_results_in_zero()
            {
                var u        = new Vector4F(3.0f, -17, 5, -6);
                var v        = new Vector4F();
                var expected = new Vector4F();

                var actual = u.GetProjected(v);

                Assert.Equal(expected, actual);
            }
示例#2
0
            public void projection_example_1()
            {
                var u        = new Vector4F(-1.0f, 2, 1, 3);
                var v        = new Vector4F(2.0f, -1, 3, 1);
                var expected = u.GetScaled(2.0f / 15.0f);

                var actual = u.GetProjected(v);

                Assert.Equal(expected, actual);
            }
示例#3
0
            public void projecting_against_zero_results_in_same_vector()
            {
                var u        = new Vector4F();
                var v        = new Vector4F(-3.0f, 8, 5, -10);
                var expected = new Vector4F(v);

                var actual = u.GetProjected(v);

                Assert.Equal(expected, actual);
            }