diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-28 21:20:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-28 21:20:11 +0400 |
commit | b5feb1940d3e1f7198b8fc72f2f9fec192e38d1e (patch) | |
tree | c0ac46389e2d9a1c972f53a4533c3ac7391a81fc /source | |
parent | 3d9b4159a43231efdddd39a4bdcd156100dd7d9a (diff) |
f-curve easing: make ease-out symmetrical to ease-in
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/easing.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/easing.c b/source/blender/blenlib/intern/easing.c index c767c62490f..62e4b5880fb 100644 --- a/source/blender/blenlib/intern/easing.c +++ b/source/blender/blenlib/intern/easing.c @@ -182,7 +182,8 @@ float BLI_easing_elastic_ease_out(float time, float begin, float change, float d else s = period / (2 * (float)M_PI) * asinf(change / amplitude); - return (amplitude * powf(2, -10 * time) * sinf((time * duration - s) * (2 * (float)M_PI) / period) + change + begin); + time = -time; + return (amplitude * powf(2, 10 * time) * sinf((time * duration - s) * (2 * (float)M_PI) / period) + change + begin); } float BLI_easing_elastic_ease_in_out(float time, float begin, float change, float duration, float amplitude, float period) |