diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index b65444108bc..d2c6c833e2e 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -268,11 +268,11 @@ bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input void ScreenLensDistortionOperation::updateVariables(float distortion, float dispersion) { - this->m_kg = maxf(minf(distortion, 1.0f), -0.999f); + this->m_kg = max_ff(min_ff(distortion, 1.0f), -0.999f); // smaller dispersion range for somewhat more control - 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); + const float d = 0.25f * max_ff(min_ff(dispersion, 1.0f), 0.0f); + this->m_kr = max_ff(min_ff((this->m_kg + d), 1.0f), -0.999f); + this->m_kb = max_ff(min_ff((this->m_kg - d), 1.0f), -0.999f); this->m_maxk = MAX3(this->m_kr, this->m_kg, this->m_kb); this->m_sc = (this->m_data->fit && (this->m_maxk > 0.0f)) ? (1.0f / (1.0f + 2.0f * this->m_maxk)) : (1.0f / (1.0f + this->m_maxk)); |