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_DifferenceMatteOperation.cpp
parent2c1abe1f5861330315a1fc58e7dfe298b8356449 (diff)
code cleanup: reduce float/double promotion
Diffstat (limited to 'source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index 628daa7c775..0b1ac1b2127 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -57,16 +57,16 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
this->inputImage1Program->read(inColor1, x, y, sampler, inputBuffers);
this->inputImage2Program->read(inColor2, x, y, sampler, inputBuffers);
- difference = (fabs(inColor2[0] - inColor1[0]) +
- fabs(inColor2[1] - inColor1[1]) +
- fabs(inColor2[2] - inColor1[2]));
+ difference = (fabsf(inColor2[0] - inColor1[0]) +
+ fabsf(inColor2[1] - inColor1[1]) +
+ fabsf(inColor2[2] - inColor1[2]));
- /*average together the distances*/
- difference=difference/3.0;
+ /* average together the distances */
+ difference = difference / 3.0f;
/*make 100% transparent*/
if (difference < tolerence) {
- outputValue[0]=0.0;
+ outputValue[0] = 0.0f;
}
/*in the falloff region, make partially transparent */
else if (difference < falloff+tolerence) {