示例#1
0
            public void can_normalize_sample()
            {
                var vector   = new VectorD(new[] { 3.0, 4, 5, -6 });
                var expected = vector.GetQuotient(vector.GetMagnitude());

                var actual = vector.GetNormal();

                Assert.Equal(expected, actual);
            }
示例#2
0
            public void zero_vector_normalizes_to_zero()
            {
                var vector   = new VectorD(4);
                var expected = new VectorD(4);

                var actual = vector.GetNormal();

                Assert.Equal(expected, actual);
            }