dominikhofmann/PRTween — Issue #10: Timing function updates
Author: typeoneerror
Created: 2011-12-23 04:28:37+00:00
State: open

Seems like the timing functions have been locked down and removed some of the original parameters from Penner's methods.

CGFloat PRTweenTimingFunctionElasticOut (CGFloat t, CGFloat b, CGFloat c, CGFloat d) {
CGFloat p = d*.3;
CGFloat s, a;
if (t==0) return b; if ((t/=d)==1) return b+c;
if (!a || a < ABS(c)) { a=c; s=p/4; }
else s = p/(2*M_PI) * asin (c/a);
return (a*pow(2,-10*t) * sin( (t*d-s)*(2*M_PI)/p ) + c + b);
}

This for example is missing the amplitude and period properties, so much of the logic testing for a isn't needed if you're going to hard code those values right? Just noticed this because when running Analyze you get "a" evaluates to a garbage value. Any reason that you got rid of those parameters?