diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-05-25 13:33:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-05-25 13:33:08 +0400 |
commit | e63ab3505fe1ebde327cbddd08471dde87b4e8ee (patch) | |
tree | d5afbcd1b8da9a4b50d561709601f6d8bc4837da /source/blender/blenlib/intern | |
parent | 08be3e06d931c4075ea65ce4de4b422e5d9ee162 (diff) |
use math functions rather then macros for bicubic interpolation.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/math_interp.c | 8 |
1 files changed, 4 insertions, 4 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); } |