From 7217927414407f8929a02c610fb06e61c0bff930 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Jul 2012 18:14:20 +0000 Subject: add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these). --- .../blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index c8052667fa0..f8628be3ff8 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -303,7 +303,7 @@ void ScreenLensDistortionOperation::updateVariables(float distortion, float disp { this->m_kg = maxf(minf(distortion, 1.0f), -0.999f); // smaller dispersion range for somewhat more control - const float d = 0.25f * MAX2(MIN2(dispersion, 1.f), 0.f); + const float d = 0.25f * maxf(minf(dispersion, 1.0f), 0.0f); this->m_kr = maxf(minf((this->m_kg + d), 1.0f), -0.999f); this->m_kb = maxf(minf((this->m_kg - d), 1.0f), -0.999f); this->m_maxk = MAX3(this->m_kr, this->m_kg, this->m_kb); -- cgit v1.2.3