Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-29 20:59:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-29 20:59:51 +0400
commitc41e1e434ab9defa35178ad8886d81b60d889e9a (patch)
tree89cc6a948b408865e475ccb1f8c2cf98edac76bc /source/blender/bmesh
parent93ff6f6dff73cf24e591dd2678ee601495714dc7 (diff)
code cleanup: replace MIN2/MAX2 with minf/maxf
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c20
2 files changed, 11 insertions, 11 deletions
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;