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/editors/object | |
parent | 1bb7cfded603028db0d52b3c0917900e83b858e6 (diff) |
use fabsf when using floats.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 2e9652686da..11e98c970a0 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -954,7 +954,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in dist = dists[i]; } else { - if (fabs(dist - distToBe) < fabs(dists[i] - distToBe)) { + if (fabsf(dist - distToBe) < fabsf(dists[i] - distToBe)) { upDown[i] = 0; changes[i][0] = vc; changes[i][1] = hc; @@ -963,7 +963,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in else { upDown[i] = 1; } - if (fabs(dists[i] - distToBe) > fabs(distToStart - distToBe)) { + if (fabsf(dists[i] - distToBe) > fabsf(distToStart - distToBe)) { changes[i][0] = 0; changes[i][1] = 0; dists[i] = distToStart; @@ -979,7 +979,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in for (i = k + 1; i < totweight; i++) { dist = dists[i]; - if (fabs(dist) > fabs(dists[i])) { + if (fabsf(dist) > fabsf(dists[i])) { bestIndex = i; } } @@ -1009,7 +1009,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in bestIndex = -1; /* find the best change with an acceptable horizontal change */ for (i = 0; i < totweight; i++) { - if (fabs(changes[i][0]) > fabs(changes[i][1] * 2.0f)) { + if (fabsf(changes[i][0]) > fabsf(changes[i][1] * 2.0f)) { bestIndex = i; break; } |