Subversion Repositories AndroidProjects

Rev

Blame | Last modification | View Log | RSS feed

package com.gebauz.bauzoid.math;

public class Interpolation
{
        // Constants========================================================================================

        // Embedded Types===================================================================================


        // Methods==========================================================================================
        private Interpolation()
        {
        }
       
       
        /** Simple ease in/ease out function. */
        public static float simpleEaseInOut(float t)
        {
                return (t * t * (3.0f - 2.0f * t));
        }

        /** Overshoots the target and then bounces back. */
        public static float overshoot(float t, float tension)
        {
                t -= 1.0f;
                return t * t * ((tension + 1) * t + tension) + 1.0f;
        }
       
        /** Overshoots the target and then bounces back with tension == 2.0f. */
        public static float overshoot(float t)
        {
                return overshoot(t, 2.0f);
        }
               
}