[Pixman] [PATCH] test/utils.c: Use pow(), not powf() in sRGB conversion routines
Søren Sandmann
sandmann at cs.au.dk
Sun Aug 26 15:29:49 PDT 2012
From: Søren Sandmann Pedersen <ssp at redhat.com>
These functions are operating on double precision, so use pow()
instead of powf().
---
test/utils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/utils.c b/test/utils.c
index df16ef5..c922ae5 100644
--- 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 powf ((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 * powf (c, 1.0/2.4) - 0.055;
+ return 1.055 * pow (c, 1.0/2.4) - 0.055;
}
void
--
1.7.4
More information about the Pixman
mailing list