]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 6 May 2013 19:53:58 +0000 (19:53 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 6 May 2013 19:53:58 +0000 (19:53 +0000)
MagickCore/gem.c

index 55b8e4a4c4651f25f4021f52015d2fed180a903b..100bf8a95d585f1e19e08dff75fa094fc9105f92 100644 (file)
@@ -1404,10 +1404,10 @@ static inline void ConvertXYZToLCHuv(const double X,const double Y,
   ConvertXYZToLuv(X,Y,Z,luma,&u,&v);
   *chroma=hypot(354.0*u-134.0,262.0*v-140.0);
   *hue=180.0*atan2(262.0*v-140.0,354.0*u-134.0)/MagickPI;
-  if (*hue < 0.0)
-    *hue+=360.0;
   *chroma=(*chroma+134.0)/354.0;
   *hue=(*hue+140.0)/262.0;
+  if (*hue < 0.0)
+    *hue+=1.0;
 }
 
 MagickPrivate void ConvertRGBToLCHuv(const double red,const double green,