Ejemplo n.º 1
0
        public void TestDenormaliseMinus11()
        {
            var space = new Space2 {
                Min = Vector2.one * -1, Max = Vector2.one * 1, Normalised = Normalisation.Zero_one_
            };

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

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