I have an elastic ease out function, formula in code:
float easeOutElastic(float t, float b, float c, float d) {
float ts = (t/=d) * t;
float tc = ts*t;
return b+c*(33*tc*ts + -106*ts*ts + 126*tc + -67*ts + 15*t);
}
Taken from here, the elastic out small variant: http://www.timotheegroleau.com/Flash/experiments/easing_function_generator.htm
I'm trying to modify the function so that the start and end values are equivalent. Essentially the red line.
I am not sure which of the parameters to modify to achieve this. Is anyone familiar with this particular easing function that could provide some guidance?
My goal is to use this function on the scaleY param of a rectangle I'm animating. I think this would provide a nice stretch/squash animation, where the rectangle returns to its original size at the end of the animation.
Thank you