getEaseValue( float t, float d )
if( d == 0 ) return 1;
if( t == 0 ) return 0;
if( t == d ) return 1;
float s = 1.70158;
// Back
return ( t /= d ) * t * ( ( s + 1 ) * t - s );
// OutBack
return ( ( t = t / d - 1 ) * t * ( ( s + 1 ) * t + s ) + 1 );
// InOutBack
if ( ( t /= d / 2 ) < 1 )
return .5 * ( t * t * ( ( ( s * = ( 1.525 ) ) + 1 ) * t - s ) );
else
return .5 * ( ( t -= 2 ) * t * ( ( ( s * = ( 1.525 ) ) + 1 ) * t + s ) + 2 );
// Bounce
return 1 - getEaseValue( 4, d - t, d );
// O
if ( ( t/=d ) < ( 1/2.75 ) )
return ( 7.5625 * t * t );
else if ( t < ( 2/2.75 ) )
return ( 7.5625 * ( t-=( 1.5/2.75 ) ) * t + .75 );
else if ( t < ( 2.5/2.75 ) )
return ( 7.5625 * ( t-=( 2.25/2.75 ) ) * t + .9375 );
else
return ( 7.5625 * ( t-=( 2.625/2.75 ) ) * t + .984375 );
// M
if ( t < d / 2 )
return getEaseValue( 3, t * 2, d ) * 0.5;
else
return getEaseValue( 4, t * 2 - d, d ) * 0.5 + 0.5;
// checkInnerControlular
return - ( Math.sqrt( 1 - ( t /= d ) * t ) - 1 );
// O
return Math.sqrt( 1 - ( t = t / d - 1 ) * t );
// M
if ( ( t /= d / 2 ) < 1 )
return - .5 * ( Math.sqrt( 1 - t * t ) - 1 );
else
return .5 * ( Math.sqrt( 1 - ( t -= 2 ) * t ) + 1 );
// Cubic
return ( t /= d ) * t * t;
// O
return ( ( t = t / d - 1 ) * t * t + 1 );
// M
if ( ( t /= d / 2 ) < 1 )
return .5 * t * t * t;
else
return .5 * ( ( t -= 2 ) * t * t + 2 );
// Elastic
t /= d;
var p:Number = d * 0.3;
s = p / 4;
return - Math.pow( 2, 10 * ( t -= 1 ) ) * Math.sin( ( t * d - s ) * ( 2 * Math.PI ) / p );
// O
p = d * 0.3;
s = p / 4;
return Math.pow( 2, - 10 * ( t / d ) ) * Math.sin( ( t - s ) * ( 2 * Math.PI ) / p ) + 1;
// M
t /= d / 2;
p = d * ( 0.3 * 1.5 );
s = p / 4;
if ( t < 1 )
return - 0.5 * ( Math.pow( 2, 10 * ( t -= 1 ) ) * Math.sin( ( t * d - s ) * ( 2 * Math.PI ) / p ) );
else
return Math.pow( 2, - 10 * ( t -= 1 ) ) * Math.sin( ( t * d - s ) * ( 2 * Math.PI ) / p ) * 0.5 + 1;
// Exponential
return t == 0 ? 0 : Math.pow( 2, 10 * ( t / d - 1 ) );
// O
return t == d ? 1 : ( - Math.pow( 2, - 10 * t / d ) + 1 );
// M
if ( ( t /= d / 2 ) < 1 )
return .5 * Math.pow( 2, 10 * ( t - 1 ) );
else
return .5 * ( - Math.pow( 2, - 10 * --t ) + 2 );
// Linear, None
return t / d;
// Regular, Quardurationatic
return ( t /= d ) * t;
// O
return - ( t /= d ) * ( t - 2 );
// M
if ( ( t /= d / 2 ) < 1 )
return .5 * t * t;
else
return - .5 * ( ( --t ) * ( t - 2 ) - 1 );
// Quartic
return ( t /= d ) * t * t * t;
// O
return - ( ( t = t / d - 1 ) * t * t * t - 1 );
// M
if ( ( t /= d / 2 ) < 1 )
return .5 * t * t * t * t;
else
return - .5 * ( ( t -= 2 ) * t * t * t - 2 );
// Strong, Quintic
return ( t /= d ) * t * t * t * t;
// O
return ( ( t = t / d - 1 ) * t * t * t * t + 1 );
// M
if ( ( t /= d / 2 ) < 1 )
return .5 * t * t * t * t * t;
else
return .5 * ( ( t -= 2 ) * t * t * t * t + 2 );
// Sine
return - Math.cos( t / d * ( Math.PI / 2 ) ) + 1;
// O
return Math.sin( t / d * ( Math.PI / 2 ) );
// M
return - .5 * ( Math.cos( Math.PI * t / d ) - 1 );