From a00b6d1271dfdcec7bad62bfd1e8d6e66fb6a49e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 10 Oct 2014 00:23:06 +0200 Subject: Cleanup: (float)floor -> floorf --- source/blender/editors/transform/transform_conversions.c | 4 ++-- source/blender/editors/transform/transform_snap.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 47adbb6d16d..86e6e611cf3 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2773,8 +2773,8 @@ void flushTransUVs(TransInfo *t) td->loc2d[1] = td->loc[1] * invy; if ((sima->flag & SI_PIXELSNAP) && (t->state != TRANS_CANCEL)) { - td->loc2d[0] = (float)floor(width * td->loc2d[0] + 0.5f) / width; - td->loc2d[1] = (float)floor(height * td->loc2d[1] + 0.5f) / height; + td->loc2d[0] = floorf(width * td->loc2d[0] + 0.5f) / width; + td->loc2d[1] = floorf(height * td->loc2d[1] + 0.5f) / height; } } } diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index af563f71376..8a3e8f19db4 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -2396,7 +2396,7 @@ bool snapNodesContext(bContext *C, const int mval[2], float *r_dist_px, float r_ /*================================================================*/ -static void applyGridIncrement(TransInfo *t, float *val, int max_index, float fac[3], GearsType action); +static void applyGridIncrement(TransInfo *t, float *val, int max_index, const float fac[3], GearsType action); void snapGridIncrementAction(TransInfo *t, float *val, GearsType action) @@ -2429,7 +2429,7 @@ void snapGridIncrement(TransInfo *t, float *val) } -static void applyGridIncrement(TransInfo *t, float *val, int max_index, float fac[3], GearsType action) +static void applyGridIncrement(TransInfo *t, float *val, int max_index, const float fac[3], GearsType action) { int i; float asp[3] = {1.0f, 1.0f, 1.0f}; // TODO: Remove hard coded limit here (3) @@ -2457,6 +2457,6 @@ static void applyGridIncrement(TransInfo *t, float *val, int max_index, float fa } for (i = 0; i <= max_index; i++) { - val[i] = fac[action] * asp[i] * (float)floor(val[i] / (fac[action] * asp[i]) + 0.5f); + val[i] = fac[action] * asp[i] * floorf(val[i] / (fac[action] * asp[i]) + 0.5f); } } -- cgit v1.2.3