Exemplo n.º 1
0
        public void TestNormalise010()
        {
            var space = new Space3 {
                Min = Vector3.zero, Max = Vector3.one * 10, Normalised = Normalisation.Zero_one_
            };

            Assert.That(Vector3.Distance(space.Project(6 * Vector3.one), Vector3.one * 0.6f) <= float.Epsilon,
                        Is.True);
        }
Exemplo n.º 2
0
        public void TestNormaliseMinus11()
        {
            var space = new Space3 {
                Min = Vector3.one * -1, Max = Vector3.one * 1, Normalised = Normalisation.Zero_one_
            };

            Assert.That(Vector3.Distance(space.Project(0.5f * Vector3.one), Vector3.one * 0.75f)
                        <= float.Epsilon,
                        Is.True);
        }