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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-29 22:14:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-29 22:14:20 +0400
commit7217927414407f8929a02c610fb06e61c0bff930 (patch)
treee1b473aa26d01cdf9f0f7597c8ac255be56362de /source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
parentf608b3c44402ef5c58217481d93e7fa83c9cd7cf (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.cpp2
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);