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>2014-03-28 07:53:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-28 07:53:37 +0400
commit7199e2288f3df27ee2d21593da64ef4597fb86fd (patch)
tree33e69c15bb612736079510dd9fbcc055c6f06e51 /source/blender/blenkernel/intern/seqeffects.c
parente6e74381819666141a5dd02d670ef06e64018dc3 (diff)
Code cleanup: use sqrtf when input and output are float
Diffstat (limited to 'source/blender/blenkernel/intern/seqeffects.c')
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index ab44cf720d0..9e59ec8d8d5 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -678,8 +678,10 @@ static void gamtabs(float gamma)
val = a;
val /= 65535.0f;
- if (gamma == 2.0f) val = sqrt(val);
- else if (gamma != 1.0f) val = pow(val, igamma);
+ if (gamma == 2.0f)
+ val = sqrtf(val);
+ else if (gamma != 1.0f)
+ val = powf(val, igamma);
gamtab[a] = (65535.99f * val);
}
@@ -1443,7 +1445,7 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
temp1 = xo * (1 - facf0 / 2) - xo * facf0 / 2;
temp2 = yo * (1 - facf0 / 2) - yo * facf0 / 2;
- pointdist = sqrt(temp1 * temp1 + temp2 * temp2);
+ pointdist = sqrtf(temp1 * temp1 + temp2 * temp2);
if (b2 < b1 && b2 < b3) {
if (hwidth < pointdist)
@@ -1500,9 +1502,9 @@ static float check_zone(WipeZone *wipezone, int x, int y, Sequence *seq, float f
hwidth = width * 0.5f;
temp1 = (halfx - (halfx) * facf0);
- pointdist = sqrt(temp1 * temp1 + temp1 * temp1);
+ pointdist = sqrtf(temp1 * temp1 + temp1 * temp1);
- temp2 = sqrt((halfx - x) * (halfx - x) + (halfy - y) * (halfy - y));
+ temp2 = sqrtf((halfx - x) * (halfx - x) + (halfy - y) * (halfy - y));
if (temp2 > pointdist) output = in_band(hwidth, fabsf(temp2 - pointdist), 0, 1);
else output = in_band(hwidth, fabsf(temp2 - pointdist), 1, 1);