All pastes #215024 Raw Edit

Something

public javascript v1 · immutable
#215024 ·published 2006-10-22 10:23 UTC
rendered paste body
// t: time (current time or time difference)// b: begin position// c: change in position // d: duratino (in msecs)// a: amplitude (can be empty)// p: period (can be empty)Tween.elasticEaseOut = function (t,b,c,d,a,p){		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;		if (!a || a < Math.abs(c)) { a=c; var s=p/4; }		else var s = p/(2*Math.PI) * Math.asin (c/a);		return (a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b);}