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 20:59:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-29 20:59:51 +0400
commitc41e1e434ab9defa35178ad8886d81b60d889e9a (patch)
tree89cc6a948b408865e475ccb1f8c2cf98edac76bc /source/blender/compositor/operations
parent93ff6f6dff73cf24e591dd2678ee601495714dc7 (diff)
code cleanup: replace MIN2/MAX2 with minf/maxf
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index daf517876e5..e28e77a5f5e 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -95,7 +95,7 @@ void ProjectorLensDistortionOperation::updateDispersion()
float result[4];
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST);
this->m_dispersion = result[0];
- this->m_kr = 0.25f * MAX2(MIN2(this->m_dispersion, 1.f), 0.f);
+ this->m_kr = 0.25f * maxf(minf(this->m_dispersion, 1.0f), 0.0f);
this->m_kr2 = this->m_kr * 20;
this->m_dispersionAvailable = true;
}
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index d431ce29554..c8052667fa0 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -301,11 +301,11 @@ bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input
void ScreenLensDistortionOperation::updateVariables(float distortion, float dispersion)
{
- this->m_kg = MAX2(MIN2(distortion, 1.f), -0.999f);
+ 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);
- this->m_kr = MAX2(MIN2((this->m_kg + d), 1.0f), -0.999f);
- this->m_kb = MAX2(MIN2((this->m_kg - d), 1.0f), -0.999f);
+ 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);
this->m_sc = (this->m_data->fit && (this->m_maxk > 0.f)) ? (1.f / (1.f + 2.f * this->m_maxk)) : (1.f / (1.f + this->m_maxk));
this->m_drg = 4.f * (this->m_kg - this->m_kr);