diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-29 22:14:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-29 22:14:20 +0400 |
commit | 7217927414407f8929a02c610fb06e61c0bff930 (patch) | |
tree | e1b473aa26d01cdf9f0f7597c8ac255be56362de /source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp | |
parent | f608b3c44402ef5c58217481d93e7fa83c9cd7cf (diff) |
add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these).
Diffstat (limited to 'source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |