X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfc-interpolation.c;h=7e845aee07ceb25aaaad872921de7a9090b2e6fa;hb=d8071bf754f070a660ac49108bd35d1900301066;hp=26c8374b59b1c9c27623802ed09e221886190b59;hpb=f659dade40988bfc309900ed054cb9cbf72e86c8;p=swftools.git diff --git a/src/swfc-interpolation.c b/src/swfc-interpolation.c index 26c8374..7e845ae 100644 --- a/src/swfc-interpolation.c +++ b/src/swfc-interpolation.c @@ -140,7 +140,7 @@ float exponentialInOut(float fraction, float start, float delta) float sineIn(float fraction, float start, float delta) { - return delta * (1 - cos(fraction * PI/2)) + start; + return delta * (1 - cos(fraction * M_PI/2)) + start; } float sineOut(float fraction, float start, float delta) @@ -164,8 +164,7 @@ float elasticIn(float fraction, float start, float delta, float amplitude, int b if (amplitude < fabs(delta)) amplitude = delta; float period = 1 / (bounces + 0.25); -// float s = asin(delta / amplitude) - 2 * PI / period; - return amplitude * pow(2, damping * (fraction - 1)) * sin(fraction * (2 * PI) / period /*+ fraction * s*/) + start; + return amplitude * pow(2, damping * (fraction - 1)) * sin(fraction * (2 * M_PI) / period) + start; } float elasticOut(float fraction, float start, float delta, float amplitude, int bounces, float damping)