color: Fix HLS-to-RGB conversion
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 26 Oct 2009 16:29:31 +0000 (16:29 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 26 Oct 2009 16:29:31 +0000 (16:29 +0000)
commitc387513a5fd5293cb8cf60e9c1334ceeff905852
tree13e53ebc667789e7ea558480e8a8253ce3049936
parent5a14db50891196a9d17a0df49bf0858551e5a0af
color: Fix HLS-to-RGB conversion

Apparently, on 64bit systems the floating point noise is enough
to screw up the float-to-int truncation.

The solution is to round up by 0.5 and then use floorf(). This
gives predictable and correct results on both 32bit and 64bit
systems.
clutter/clutter-color.c