From: cristy Date: Thu, 4 Apr 2013 22:47:28 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3947 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a7af3c73b7ba6e96926e62ede8a5bbe74d55877;p=imagemagick --- diff --git a/MagickCore/gem.c b/MagickCore/gem.c index c74ca1aed..c01f8da77 100644 --- a/MagickCore/gem.c +++ b/MagickCore/gem.c @@ -813,9 +813,9 @@ MagickPrivate void ConvertRGBToLCH(const double red,const double green, ConvertXYZToLab(X,Y,Z,&L,&a,&b); C=hypot(a-0.5,b-0.5); H=180.0*atan2(b-0.5,a-0.5)/MagickPI; - if (H < 360.0) + if (H < 0.0) H+=360.0; - if (H > 360.0) + if (H >= 360.0) H-=360.0; *luma=L; *chroma=C;