Example #1
0
        public void OutInverse_InputAboveRange_ReturnsDestination()
        {
            Ease  ease = new Quadratic();
            float y    = 1.6f;

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

            Assert.AreEqual(expected, actual, 0.001f);
        }
Example #2
0
        public void OutInverse_InputBelowRange_ReturnsOrigin()
        {
            Ease  ease = new Quadratic();
            float y    = -0.6f;

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

            Assert.AreEqual(expected, actual, 0.001f);
        }
Example #3
0
        public void OutInverse_InputInRange_ReturnsExpectedValue()
        {
            Ease  ease = new Quadratic();
            float y    = 0.6f;

            float expected = 0.3675f;
            float actual   = ease.OutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Example #4
0
        public void OutInverse_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.OutInverse(y);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Example #5
0
        public void OutInverse_ChangedScaleInputBelowRange_ReturnsOrigin()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Quadratic(scale);
            float  y     = -1.1f;

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

            Assert.AreEqual(expected, actual, 0.001f);
        }
Example #6
0
        public void OutInverse_ChangedScaleInputInRange_ReturnsExpectedValue()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Quadratic(scale);
            float  y     = 2.5f;

            float expected = 0.945f;
            float actual   = ease.OutInverse(y);

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