Пример #1
0
        public void InOutInverse_InputAboveRange_ReturnsDestination()
        {
            Ease  ease = new Quadratic();
            float y    = 1.6f;

            float expected = ease.Scale.X;
            float actual   = ease.InOutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Пример #2
0
        public void InOutInverse_InputBelowRange_ReturnsOrigin()
        {
            Ease  ease = new Quadratic();
            float y    = -0.6f;

            float expected = 0;
            float actual   = ease.InOutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Пример #3
0
        public void InOutInverse_InputInRange2_ReturnsExpectedValue()
        {
            Ease  ease = new Quadratic();
            float y    = 0.4f;

            float expected = 0.4472f;
            float actual   = ease.InOutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Пример #4
0
        public void InOutInverse_ChangedScaleInputAboveRange_ReturnsDestination()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Quadratic(scale);
            float  y     = 6.1f;

            float expected = ease.Scale.X;
            float actual   = ease.InOutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Пример #5
0
        public void InOutInverse_ChangedScaleInputBelowRange_ReturnsOrigin()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Quadratic(scale);
            float  y     = -1.1f;

            float expected = 0;
            float actual   = ease.InOutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Пример #6
0
        public void InOutInverse_ChangedScaleInputInRange2_ReturnsExpectedValue()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Quadratic(scale);
            float  y     = 3.5f;

            float expected = 2.174f;
            float actual   = ease.InOutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }