diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-04 01:35:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-04 01:35:04 +0400 |
commit | 5da2135eef39ac042a8c4babcac7be375e6903d2 (patch) | |
tree | 520282b4cae162503de17481cfbfbe43a93ed073 /source/blender/editors/transform/transform_generics.c | |
parent | b075765edd9e8f18b088faf1a55358d0f8a289cd (diff) |
code cleanup: double promotion & some style cleanup
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 0bf02d1a2bf..bea1002b5c6 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -204,16 +204,16 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) } if (axis & 2) { - if (fabs(iloc[1])<=tolerance[1] || - loc[1]*iloc[1]<0.0f) + if (fabsf(iloc[1]) <= tolerance[1] || + loc[1] * iloc[1]<0.0f) { loc[1]= 0.0f; clip = 1; } } if (axis & 4) { - if (fabs(iloc[2])<=tolerance[2] || - loc[2]*iloc[2]<0.0f) + if (fabsf(iloc[2]) <= tolerance[2] || + loc[2] * iloc[2] < 0.0f) { loc[2]= 0.0f; clip = 1; @@ -541,12 +541,12 @@ static void recalcData_nla(TransInfo *t) switch (snla->autosnap) { case SACTSNAP_FRAME: /* snap to nearest frame/time */ if (snla->flag & SNLA_DRAWTIME) { - tdn->h1[0]= (float)( floor((tdn->h1[0]/secf) + 0.5f) * secf ); - tdn->h2[0]= (float)( floor((tdn->h2[0]/secf) + 0.5f) * secf ); + tdn->h1[0] = (float)(floor(((double)tdn->h1[0] / secf) + 0.5) * secf); + tdn->h2[0] = (float)(floor(((double)tdn->h2[0] / secf) + 0.5) * secf); } else { - tdn->h1[0]= (float)( floor(tdn->h1[0]+0.5f) ); - tdn->h2[0]= (float)( floor(tdn->h2[0]+0.5f) ); + tdn->h1[0] = floorf(tdn->h1[0] + 0.5f); + tdn->h2[0] = floorf(tdn->h2[0] + 0.5f); } break; |