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/sculpt_paint/paint_utils.c | |
parent | 1bb7cfded603028db0d52b3c0917900e83b858e6 (diff) |
use fabsf when using floats.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_utils.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 3c8f39a44b1..3f9e0051d2e 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -287,7 +287,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in /* the triangle with the largest absolute values is the one * with the most negative weights */ imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[3].co, p, w); - absw = fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + absw = fabsf(w[0]) + fabsf(w[1]) + fabsf(w[2]); if (absw < minabsw) { uv[0] = tf->uv[0][0] * w[0] + tf->uv[1][0] * w[1] + tf->uv[3][0] * w[2]; uv[1] = tf->uv[0][1] * w[0] + tf->uv[1][1] * w[1] + tf->uv[3][1] * w[2]; @@ -295,7 +295,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in } imapaint_tri_weights(ob, mv[1].co, mv[2].co, mv[3].co, p, w); - absw = fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + absw = fabsf(w[0]) + fabsf(w[1]) + fabsf(w[2]); if (absw < minabsw) { uv[0] = tf->uv[1][0] * w[0] + tf->uv[2][0] * w[1] + tf->uv[3][0] * w[2]; uv[1] = tf->uv[1][1] * w[0] + tf->uv[2][1] * w[1] + tf->uv[3][1] * w[2]; @@ -304,7 +304,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in } else { imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[2].co, p, w); - absw = fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + absw = fabsf(w[0]) + fabsf(w[1]) + fabsf(w[2]); if (absw < minabsw) { uv[0] = tf->uv[0][0] * w[0] + tf->uv[1][0] * w[1] + tf->uv[2][0] * w[2]; uv[1] = tf->uv[0][1] * w[0] + tf->uv[1][1] * w[1] + tf->uv[2][1] * w[2]; |