From c41e1e434ab9defa35178ad8886d81b60d889e9a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Jul 2012 16:59:51 +0000 Subject: code cleanup: replace MIN2/MAX2 with minf/maxf --- source/blender/bmesh/intern/bmesh_interp.c | 2 +- source/blender/bmesh/intern/bmesh_polygon.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/bmesh') diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index c39096d0800..74d3df01fd0 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -236,7 +236,7 @@ static float quad_coord(float aa[3], float bb[3], float cc[3], float dd[3], int f1 = fabsf(f1); f2 = fabsf(f2); - f1 = MIN2(f1, f2); + f1 = minf(f1, f2); CLAMP(f1, 0.0f, 1.0f + FLT_EPSILON); } else { diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 03b72aefee6..5d63172dbfa 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -507,8 +507,8 @@ static int linecrossesf(const float v1[2], const float v2[2], const float v3[2], #define GETMIN2_AXIS(a, b, ma, mb, axis) \ { \ - ma[axis] = MIN2(a[axis], b[axis]); \ - mb[axis] = MAX2(a[axis], b[axis]); \ + ma[axis] = minf(a[axis], b[axis]); \ + mb[axis] = maxf(a[axis], b[axis]); \ } (void)0 #define GETMIN2(a, b, ma, mb) \ @@ -538,17 +538,17 @@ static int linecrossesf(const float v1[2], const float v2[2], const float v3[2], /* do an interval test on the x and y axes */ /* first do x axis */ - if (ABS(v1[1] - v2[1]) < EPS && - ABS(v3[1] - v4[1]) < EPS && - ABS(v1[1] - v3[1]) < EPS) + if (fabsf(v1[1] - v2[1]) < EPS && + fabsf(v3[1] - v4[1]) < EPS && + fabsf(v1[1] - v3[1]) < EPS) { return (mv4[0] >= mv1[0] && mv3[0] <= mv2[0]); } /* now do y axis */ - if (ABS(v1[0] - v2[0]) < EPS && - ABS(v3[0] - v4[0]) < EPS && - ABS(v1[0] - v3[0]) < EPS) + if (fabsf(v1[0] - v2[0]) < EPS && + fabsf(v3[0] - v4[0]) < EPS && + fabsf(v1[0] - v3[0]) < EPS) { return (mv4[1] >= mv1[1] && mv3[1] <= mv2[1]); } @@ -994,8 +994,8 @@ void BM_face_legal_splits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) for (i = 0, l = BM_FACE_FIRST_LOOP(f); i < f->len; i++, l = l->next) { p1 = projverts[i]; - out[0] = MAX2(out[0], p1[0]) + 0.01f; - out[1] = MAX2(out[1], p1[1]) + 0.01f; + out[0] = maxf(out[0], p1[0]) + 0.01f; + out[1] = maxf(out[1], p1[1]) + 0.01f; out[2] = 0.0f; p1[2] = 0.0f; -- cgit v1.2.3