Exemplo n.º 1
0
        public void In_InputBelowRange_ReturnsOrigin()
        {
            Ease  ease = new Sine();
            float x    = -0.5f;

            float expected = 0;
            float actual   = ease.In(x);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Exemplo n.º 2
0
        public void In_InputAboveRange_ReturnsDestination()
        {
            Ease  ease = new Sine();
            float x    = 1.5f;

            float expected = ease.Scale.Y;
            float actual   = ease.In(x);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Exemplo n.º 3
0
        public void In_InputInRange_ReturnsExpectedValue()
        {
            Ease  ease = new Sine();
            float x    = 0.6f;

            float expected = 0.4122f;
            float actual   = ease.In(x);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Exemplo n.º 4
0
        public void In_ChangedScaleInputBelowRange_ReturnsOrigin()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Sine(scale);
            float  x     = -1;

            float expected = 0;
            float actual   = ease.In(x);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Exemplo n.º 5
0
        public void In_ChangedScaleInputInRange_ReturnsExpectedValue()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Sine(scale);
            float  x     = 2.5f;

            float expected = 2.667f;
            float actual   = ease.In(x);

            Assert.AreEqual(expected, actual, 0.001f);
        }
Exemplo n.º 6
0
        public void In_ChangedScaleInputAboveRange_ReturnsDestination()
        {
            Vector scale = new Vector(4, 6);
            Ease   ease  = new Sine(scale);
            float  x     = 11.1f;

            float expected = ease.Scale.Y;
            float actual   = ease.In(x);

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