diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-19 16:12:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-19 16:17:10 +0400 |
commit | a51a0ca772b21814e29bdb3b2b5fd854e29c5334 (patch) | |
tree | 134e4517c0a8cbd2ee05bb56d223e0922820e06e /source/blender/blenkernel | |
parent | 9c93c0bf08c0bc73d2c09e7f8c57721b557eb222 (diff) |
Math Lib: add shell_v3v3_normalized_to_dist and v2 version
bypass angle calculation to avoids (asin, sqrt, cos).
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index fc74ae5fe60..d4fa9de1043 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1928,6 +1928,7 @@ static void berekenx(float *f, float *o, int b) /* Calculate F-Curve value for 'evaltime' using BezTriple keyframes */ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime) { + const float eps = 1.e-8f; BezTriple *bezt, *prevbezt, *lastbezt; float v1[2], v2[2], v3[2], v4[2], opl[32], dx, fac; unsigned int a; @@ -2073,7 +2074,7 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime if (exact) { cvalue = prevbezt->vec[1][1]; } - else if (fabsf(bezt->vec[1][0] - evaltime) < SMALL_NUMBER) { + else if (fabsf(bezt->vec[1][0] - evaltime) < eps) { cvalue = bezt->vec[1][1]; } /* evaltime occurs within the interval defined by these two keyframes */ |