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 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/blenlib/intern/math_interp.c') 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); } -- cgit v1.2.3