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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-25 13:33:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-25 13:33:08 +0400
commite63ab3505fe1ebde327cbddd08471dde87b4e8ee (patch)
treed5afbcd1b8da9a4b50d561709601f6d8bc4837da /source
parent08be3e06d931c4075ea65ce4de4b422e5d9ee162 (diff)
use math functions rather then macros for bicubic interpolation.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/intern/math_interp.c8
-rw-r--r--source/blender/editors/space_node/node_draw.c4
2 files changed, 6 insertions, 6 deletions
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 */