diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 22:23:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 22:23:30 +0400 |
commit | 9b948717b019fbd8e511595bd23ed1970b077085 (patch) | |
tree | 52e9203e26a4900b43bb82e699f6ca8a8a5b2cda /source/blender/modifiers | |
parent | a18ead1521ccd14d45adc335dd1dddd89a71cc96 (diff) |
code cleanup: float <> double conversion.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_laplaciansmooth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 566c6bdd089..6f6589d4d14 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -52,8 +52,8 @@ #include "ONL_opennl.h" -#define MOD_LAPLACIANSMOOTH_MAX_EDGE_PERCENTAGE 1.8 -#define MOD_LAPLACIANSMOOTH_MIN_EDGE_PERCENTAGE 0.02 +#define MOD_LAPLACIANSMOOTH_MAX_EDGE_PERCENTAGE 1.8f +#define MOD_LAPLACIANSMOOTH_MIN_EDGE_PERCENTAGE 0.02f struct BLaplacianSystem { float *eweights; /* Length weights per Edge */ @@ -279,13 +279,13 @@ static float compute_volume(float (*vertexCos)[3], MFace *mfaces, int numFaces) z3 = vf[2][2]; - vol += (1.0 / 6.0) * (x2 * y3 * z1 + x3 * y1 * z2 - x1 * y3 * z2 - x2 * y1 * z3 + x1 * y2 * z3 - x3 * y2 * z1); + vol += (1.0f / 6.0f) * (x2 * y3 * z1 + x3 * y1 * z2 - x1 * y3 * z2 - x2 * y1 * z3 + x1 * y2 * z3 - x3 * y2 * z1); if ((&mfaces[i])->v4) { vf[3] = vertexCos[mfaces[i].v4]; x4 = vf[3][0]; y4 = vf[3][1]; z4 = vf[3][2]; - vol += (1.0 / 6.0) * (x1 * y3 * z4 - x1 * y4 * z3 - x3 * y1 * z4 + x3 * z1 * y4 + y1 * x4 * z3 - x4 * y3 * z1); + vol += (1.0f / 6.0f) * (x1 * y3 * z4 - x1 * y4 * z3 - x3 * y1 * z4 + x3 * z1 * y4 + y1 * x4 * z3 - x4 * y3 * z1); } } return fabsf(vol); @@ -365,7 +365,7 @@ static void init_laplacian_matrix(LaplacianSystem *sys) else { areaf = area_tri_v3(v1, v2, v3); } - if (fabs(areaf) < sys->min_area) { + if (fabsf(areaf) < sys->min_area) { sys->zerola[idv1] = 1; sys->zerola[idv2] = 1; sys->zerola[idv3] = 1; |