def easeInOutQuad(t, b, c, d):
 t /= (d / 2)
 if (t < 1):
  return ((((c / 2) * t) * t) + b)
 t -= 1
 return ((((- c) / 2) * ((t * (t - 2)) - 1)) + b)

def easeInOutQuad ( t , b , c , d ) : t /= ( d / 2 ) if ( t < 1 ) : return ( ( ( ( c / 2 ) * t ) * t ) + b ) t -= 1 return ( ( ( ( - c ) / 2 ) * ( ( t * ( t - 2 ) ) - 1 ) ) + b )
robert penner easing function examples at: URL t = current time in frames or whatever unit b = beginning/start value c = change in value d = duration .