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-06-09 23:57:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-09 23:57:14 +0400
commit8e7d7d5ea56c75739164b98f5fb2f97ff51d697b (patch)
tree7dcdd0f713993af8af39b65cee89b2e11b7f780b /source/blender/compositor/operations/COM_GammaOperation.cpp
parent2c1abe1f5861330315a1fc58e7dfe298b8356449 (diff)
code cleanup: reduce float/double promotion
Diffstat (limited to 'source/blender/compositor/operations/COM_GammaOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index f0887d4adee..989ffd5dfba 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -46,9 +46,9 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s
this->inputGammaProgram->read(inputGamma, x, y, sampler, inputBuffers);
const float gamma = inputGamma[0];
/* check for negative to avoid nan's */
- color[0] = inputValue[0]>0.0f?pow(inputValue[0], gamma):inputValue[0];
- color[1] = inputValue[1]>0.0f?pow(inputValue[1], gamma):inputValue[1];
- color[2] = inputValue[2]>0.0f?pow(inputValue[2], gamma):inputValue[2];
+ color[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
+ color[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1];
+ color[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2];
color[3] = inputValue[3];
}