wrlib: changed Gamma Correction calculation to use single-precision float

The original code was using double precision floating point to perform the
color corrections for the creation of the standard colormap. This precision
is not necessary because color coding is 16 bits anyway, and on some
architecture the double precision comes with a cost.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS authored and Carlos R. Mafra committed 2015-05-24 23:25:57 +01:00
1 parent 9ab2203456
commit b64d9e6be0
2 files changed
+16 -11

No files matched your search

+1
View File
@@ -70,6 +70,7 @@ AC_CACHE_CHECK([if sinf+cosf are defined in math.h], [wm_cv_libm_sinf],
a = atan2f(a, b);
b = cosf(a);
a = sinf(b);
a = powf(a, b);
return (int)a;])],
[wm_cv_libm_sinf="`echo "$wm_arg" | sed -e 's,^.*% *,,' `" ; break])
done