diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-21 19:27:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-21 19:27:40 +0400 |
commit | 62a73381a7ec63e75960d3c9545c638c85d3b06a (patch) | |
tree | 25d16dfc4c245bacb98c3737c3817d1a52ce8d93 /source/blender/blenkernel/intern | |
parent | 1bb7cfded603028db0d52b3c0917900e83b858e6 (diff) |
use fabsf when using floats.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index af6583fd726..6a8ddd8e00a 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -1438,9 +1438,9 @@ static void cyclic_offs_bone(Object *ob, bPose *pose, bActionStrip *strip, float if (strip->flag & ACTSTRIP_CYCLIC_USEZ) pose->cyclic_offset[2] = time * min[2]; } else { - if (fabs(min[0]) >= fabs(min[1]) && fabs(min[0]) >= fabs(min[2])) + if (fabsf(min[0]) >= fabsf(min[1]) && fabsf(min[0]) >= fabsf(min[2])) pose->cyclic_offset[0] = time * min[0]; - else if (fabs(min[1]) >= fabs(min[0]) && fabs(min[1]) >= fabs(min[2])) + else if (fabsf(min[1]) >= fabsf(min[0]) && fabsf(min[1]) >= fabsf(min[2])) pose->cyclic_offset[1] = time * min[1]; else pose->cyclic_offset[2] = time * min[2]; diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 31491a80f2b..e7dc825accd 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1712,7 +1712,7 @@ static void calc_bevel_sin_cos(float x1, float y1, float x2, float y2, float *si y2 /= t02; t02 = x1 * x2 + y1 * y2; - if (fabs(t02) >= 1.0) + if (fabsf(t02) >= 1.0f) t02 = 0.5 * M_PI; else t02 = (saacos(t02)) / 2.0f; @@ -2366,9 +2366,9 @@ void BKE_curve_bevelList_make(Object *ob) bevp0 = bevp1 + (nr - 1); nr--; while (nr--) { - if (fabs(bevp0->vec[0] - bevp1->vec[0]) < 0.00001) { - if (fabs(bevp0->vec[1] - bevp1->vec[1]) < 0.00001) { - if (fabs(bevp0->vec[2] - bevp1->vec[2]) < 0.00001) { + if (fabsf(bevp0->vec[0] - bevp1->vec[0]) < 0.00001f) { + if (fabsf(bevp0->vec[1] - bevp1->vec[1]) < 0.00001f) { + if (fabsf(bevp0->vec[2] - bevp1->vec[2]) < 0.00001f) { bevp0->dupe_tag = TRUE; bl->dupe_nr++; } |