From e63ab3505fe1ebde327cbddd08471dde87b4e8ee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 25 May 2013 09:33:08 +0000 Subject: use math functions rather then macros for bicubic interpolation. --- source/blender/blenlib/intern/math_interp.c | 8 ++++---- source/blender/editors/space_node/node_draw.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c index de192d43699..81d931cfba6 100644 --- a/source/blender/blenlib/intern/math_interp.c +++ b/source/blender/blenlib/intern/math_interp.c @@ -44,10 +44,10 @@ static float P(float k) { float p1, p2, p3, p4; - p1 = MAX2(k + 2.0f, 0); - p2 = MAX2(k + 1.0f, 0); - p3 = MAX2(k, 0); - p4 = MAX2(k - 1.0f, 0); + p1 = max_ff(k + 2.0f, 0.0f); + p2 = max_ff(k + 1.0f, 0.0f); + p3 = max_ff(k, 0.0f); + p4 = max_ff(k - 1.0f, 0.0f); return (float)(1.0f / 6.0f) * (p1 * p1 * p1 - 4.0f * p2 * p2 * p2 + 6.0f * p3 * p3 * p3 - 4.0f * p4 * p4 * p4); } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index d4228ac03b7..39287226bed 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -357,7 +357,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node) uiBlockLayoutResolve(node->block, NULL, &buty); /* ensure minimum socket height in case layout is empty */ - buty = MIN2(buty, dy - NODE_DY); + buty = min_ii(buty, dy - NODE_DY); nsock->locx = locx + NODE_WIDTH(node); /* place the socket circle in the middle of the layout */ @@ -444,7 +444,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node) uiBlockLayoutResolve(node->block, NULL, &buty); /* ensure minimum socket height in case layout is empty */ - buty = MIN2(buty, dy - NODE_DY); + buty = min_ii(buty, dy - NODE_DY); nsock->locx = locx; /* place the socket circle in the middle of the layout */ -- cgit v1.2.3