diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-17 03:07:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-17 03:07:24 +0400 |
commit | 3f647ed6afd268dc808659b5a7978e55de1a0611 (patch) | |
tree | ec995249b3e78fed13fe27233f0c6fd3da8f9907 /source/blender/modifiers/intern/MOD_laplaciansmooth.c | |
parent | 458533628596497c8f15175812932ebf986f5d0f (diff) |
code cleanup: double, float - conversion warnings.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_laplaciansmooth.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_laplaciansmooth.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index c22805003c0..4c876102996 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -549,7 +549,7 @@ static void validate_solution(LaplacianSystem * sys, short flag, float lambda, f } for (i = 0; i < sys->numVerts; i++) { if (sys->zerola[i] == 0) { - lam = sys->numNeEd[i] == sys->numNeFa[i] ? (lambda >= 0.0 ? 1.0 : -1.0) : (lambda_border >= 0.0 ? 1.0 : -1.0); + lam = sys->numNeEd[i] == sys->numNeFa[i] ? (lambda >= 0.0f ? 1.0f : -1.0f) : (lambda_border >= 0.0f ? 1.0f : -1.0f); if (flag & MOD_LAPLACIANSMOOTH_X) { sys->vertexCos[i][0] += lam * (nlGetVariable(0, i) - sys->vertexCos[i][0]); } @@ -635,27 +635,27 @@ static void laplaciansmoothModifier_do( if (sys->zerola[i] == 0) { if (smd->flag & MOD_LAPLACIANSMOOTH_NORMALIZED) { w = sys->vweights[i]; - sys->vweights[i] = (w == 0.0f) ? 0.0f : -fabs(smd->lambda) * wpaint / w; + sys->vweights[i] = (w == 0.0f) ? 0.0f : -fabsf(smd->lambda) * wpaint / w; w = sys->vlengths[i]; - sys->vlengths[i] = (w == 0.0f) ? 0.0f : -fabs(smd->lambda_border) * wpaint * 2.0f / w; + sys->vlengths[i] = (w == 0.0f) ? 0.0f : -fabsf(smd->lambda_border) * wpaint * 2.0f / w; if (sys->numNeEd[i] == sys->numNeFa[i]) { - nlMatrixAdd(i, i, 1.0f + fabs(smd->lambda) * wpaint); + nlMatrixAdd(i, i, 1.0f + fabsf(smd->lambda) * wpaint); } else { - nlMatrixAdd(i, i, 1.0f + fabs(smd->lambda_border) * wpaint * 2.0f); + nlMatrixAdd(i, i, 1.0f + fabsf(smd->lambda_border) * wpaint * 2.0f); } } else { w = sys->vweights[i] * sys->ring_areas[i]; - sys->vweights[i] = (w == 0.0f) ? 0.0f : -fabs(smd->lambda) * wpaint / (4.0f * w); + sys->vweights[i] = (w == 0.0f) ? 0.0f : -fabsf(smd->lambda) * wpaint / (4.0f * w); w = sys->vlengths[i]; - sys->vlengths[i] = (w == 0.0f) ? 0.0f : -fabs(smd->lambda_border) * wpaint * 2.0f / w; + sys->vlengths[i] = (w == 0.0f) ? 0.0f : -fabsf(smd->lambda_border) * wpaint * 2.0f / w; if (sys->numNeEd[i] == sys->numNeFa[i]) { - nlMatrixAdd(i, i, 1.0f + fabs(smd->lambda) * wpaint / (4.0f * sys->ring_areas[i])); + nlMatrixAdd(i, i, 1.0f + fabsf(smd->lambda) * wpaint / (4.0f * sys->ring_areas[i])); } else { - nlMatrixAdd(i, i, 1.0f + fabs(smd->lambda_border) * wpaint * 2.0f); + nlMatrixAdd(i, i, 1.0f + fabsf(smd->lambda_border) * wpaint * 2.0f); } } } |