Beispiel #1
0
        public void TestDenormaliseMinus11()
        {
            var space = new Space3 {
                Min = Vector3.one * -1, Max = Vector3.one * 1, Normalised = Normalisation.Zero_one_
            };

            Assert.That(Vector3.Distance(space.Reproject(0.75f * Vector3.one), Vector3.one * 0.5f)
                        <= float.Epsilon,
                        Is.True);
        }
Beispiel #2
0
        public void TestDenormalise010()
        {
            var space = new Space3 {
                Min = Vector3.zero, Max = Vector3.one * 10, Normalised = Normalisation.Zero_one_
            };

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