Beispiel #1
0
            public void create_x_unit()
            {
                var expected = new Vector2D(1, 0);

                var actual = Vector2D.CreateXUnit();

                Assert.Equal(expected, actual);
            }
Beispiel #2
0
            public void unit_x_normalizes_to_self()
            {
                var vector   = Vector2D.CreateXUnit();
                var expected = new Vector2D(vector);

                var actual = vector.GetNormal();

                Assert.Equal(expected, actual);
            }
Beispiel #3
0
            public void unit_x_normalizes_to_self()
            {
                var actual   = Vector2D.CreateXUnit();
                var expected = new Vector2D(actual);

                actual.Normalize();

                Assert.Equal(expected, actual);
            }