don't return NaN for hue if r=g=b

SVN revision: 39019
This commit is contained in:
rephorm 2009-02-15 01:53:02 +00:00 committed by rephorm
parent e17e1e8bb9
commit a3fdd2ab4e
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, fl
d = max - min;
if (v) *v = (max / 255.0);
if (!max)
if (!max || !d)
{
if (s) *s = 0;
if (h) *h = 0;