projects
/
platform
/
upstream
/
pixman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8577dab
)
test/utils.c: Use pow(), not powf() in sRGB conversion routines
author
Søren Sandmann Pedersen
<ssp@redhat.com>
Sun, 26 Aug 2012 22:23:53 +0000
(18:23 -0400)
committer
Søren Sandmann Pedersen
<ssp@redhat.com>
Wed, 29 Aug 2012 19:05:49 +0000
(15:05 -0400)
These functions are operating on double precision values, so use pow()
instead of powf().
test/utils.c
patch
|
blob
|
history
diff --git
a/test/utils.c
b/test/utils.c
index
df16ef5
..
c922ae5
100644
(file)
--- a/
test/utils.c
+++ b/
test/utils.c
@@
-772,7
+772,7
@@
convert_srgb_to_linear (double c)
if (c <= 0.04045)
return c / 12.92;
else
- return pow
f
((c + 0.055) / 1.055, 2.4);
+ return pow ((c + 0.055) / 1.055, 2.4);
}
double
@@
-781,7
+781,7
@@
convert_linear_to_srgb (double c)
if (c <= 0.0031308)
return c * 12.92;
else
- return 1.055 * pow
f
(c, 1.0/2.4) - 0.055;
+ return 1.055 * pow (c, 1.0/2.4) - 0.055;
}
void