diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-04 10:55:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-04 10:55:29 +0400 |
commit | deec4ce0bc77519f68392bc5b29ef211a31f1588 (patch) | |
tree | 81865ab303df791e61d9b50e849c53791be0ce0a /source/blender/blenkernel/intern | |
parent | a05fdb837b89f2fba04587e99d0eecaa9cf174c3 (diff) |
Code Cleanup: avoid double promotion.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index d86fc5c9aef..1beaa59baad 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1151,7 +1151,7 @@ static int cloth_build_springs ( ClothModifierData *clmd, DerivedMesh *dm ) spring->kl = MAX2(mface[i].v4, mface[i].v2); spring->restlen = len_v3v3(cloth->verts[spring->kl].xrest, cloth->verts[spring->ij].xrest); spring->type = CLOTH_SPRING_TYPE_SHEAR; - spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0; + spring->stiffness = (cloth->verts[spring->kl].shear_stiff + cloth->verts[spring->ij].shear_stiff) / 2.0f; BLI_linklist_append ( &edgelist[spring->ij], spring ); BLI_linklist_append ( &edgelist[spring->kl], spring ); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 33b17f27ac8..ad89a9c959f 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -492,7 +492,7 @@ static void contarget_get_mesh_mat (Object *ob, const char *substring, float mat copy_v3_v3(plane, tmat[1]); cross_v3_v3v3(mat[0], normal, plane); - if(len_v3(mat[0]) < 1e-3) { + if(len_v3(mat[0]) < 1e-3f) { copy_v3_v3(plane, tmat[0]); cross_v3_v3v3(mat[0], normal, plane); } @@ -1263,7 +1263,7 @@ static void followpath_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstr /* If the curve is cyclic, enable looping around if the time is * outside the bounds 0..1 */ if ((curvetime < 0.0f) || (curvetime > 1.0f)) { - curvetime -= floor(curvetime); + curvetime -= floorf(curvetime); } } else { diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 318165af804..5feeb4c300d 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1987,7 +1987,7 @@ static float fcurve_eval_keyframes (FCurve *fcu, BezTriple *bezts, float evaltim for (a=0; prevbezt && bezt && (a < fcu->totvert-1); a++, prevbezt=bezt, bezt++) { /* use if the key is directly on the frame, rare cases this is needed else we get 0.0 instead. */ - if(fabs(bezt->vec[1][0] - evaltime) < SMALL_NUMBER) { + if(fabsf(bezt->vec[1][0] - evaltime) < SMALL_NUMBER) { cvalue= bezt->vec[1][1]; } /* evaltime occurs within the interval defined by these two keyframes */ diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index a8f89b0a1eb..9edcc7a73e8 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -1583,7 +1583,7 @@ typedef struct WipeZone { static void precalc_wipe_zone(WipeZone *wipezone, WipeVars *wipe, int xo, int yo) { wipezone->flip = (wipe->angle < 0); - wipezone->angle = tan(DEG2RAD(fabsf(wipe->angle))); + wipezone->angle = tanf(DEG2RADF(fabsf(wipe->angle))); wipezone->xo = xo; wipezone->yo = yo; wipezone->width = (int)(wipe->edgeWidth*((xo+yo)/2.0f)); @@ -1602,9 +1602,9 @@ static float in_band(float width,float dist,int side,int dir) return (float)side; if(side == 1) - alpha = (dist+0.5*width) / (width); + alpha = (dist+0.5f*width) / (width); else - alpha = (0.5*width-dist) / (width); + alpha = (0.5f*width-dist) / (width); if(dir == 0) alpha = 1-alpha; |