1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

6 Commits

Author SHA1 Message Date
Christophe CURIS
b64d9e6be0 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>
2015-05-24 23:25:57 +01:00
Christophe CURIS
9ab2203456 Use single-precision math functions when available
Since C99 we have floating point functions available for single precision,
so as it is what we need we detect them (configure) and use them when
appropriate. The goal is to avoid unnecessary float->double + double->float
conversion.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-05-24 23:25:57 +01:00
Christophe CURIS
78690de103 configure: cosmetic improvements on comments
This patch brings more consistency in the presentation of comments,
including:
 - 2 line spaces between blocks (M4 macro tend to make the file look quite
bulky, so it is making the file more aerated)
 - fixes in the length of underlining
 - adding a few comments on the reason of the check to ease maintainance

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-01-02 10:08:09 +00:00
Christophe CURIS
4799df5506 replaced all local definitions of PI by a single one
For code maintainability, it is better to have a single definition of the
constant than many ones dispatched in many places. In addition, we try to
count on the constant M_PI that can be defined by the header <math.h> if
possible because it may have the best accuracy for the platform.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-12-10 10:19:19 +00:00
Christophe CURIS
95ee539d6d Configure: Added explicit check for math library header
Compilation will not work if the header is missing, so make sure
it is present and compilable first. This can highligh sooner if
a user forgot to install the corresponding dev package.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-17 01:54:06 +01:00
Christophe CURIS
f68ec6c913 Configure: Moved check for Math lib to a dedicated M4 macro
Took the opportunity to rewrite the check using autoconf macros
to generate a more compatible configure script.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2013-06-17 01:16:51 +01:00