]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 8 Apr 2013 14:57:50 +0000 (14:57 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 8 Apr 2013 14:57:50 +0000 (14:57 +0000)
MagickCore/gem.c

index bd4a3f158eb8759c2106756728397722402456ef..322304ef82c91ec3bcc0232d32a8ea57ca93301f 100644 (file)
@@ -530,8 +530,8 @@ MagickPrivate void ConvertRGBToHCL(const double red,const double green,
   assert(hue != (double *) NULL);
   ConvertRGBToXYZ(red,green,blue,&X,&Y,&Z);
   ConvertXYZToLuv(X,Y,Z,&L,&u,&v);
-  C=hypot(u-134.0/354.0,v-140.0/262.0);
-  H=180.0*atan2(v-140.0/262.0,u-134.0/354.0)/MagickPI/360.0;
+  C=hypot((u-134.0)/354.0,(v-140.0)/262.0);
+  H=180.0*atan2((v-140.0)/262.0,(u-134.0)/354.0)/MagickPI/360.0;
   if (H < 0.0)
     H+=1.0;
   if (H >= 1.0)
@@ -882,8 +882,8 @@ MagickPrivate void ConvertRGBToLCHuv(const double red,const double green,
   assert(hue != (double *) NULL);
   ConvertRGBToXYZ(red,green,blue,&X,&Y,&Z);
   ConvertXYZToLuv(X,Y,Z,&L,&u,&v);
-  C=hypot(u-134.0/354.0,v-140.0/262.0);
-  H=180.0*atan2(v-140.0/262.0,u-134.0/354.0)/MagickPI/360.0;
+  C=hypot((u-134.0)/354.0,(v-140.0)/262.0);
+  H=180.0*atan2((v-140.0)/262.0,(u-134.0)/354.0)/MagickPI/360.0;
   if (H < 0.0)
     H+=1.0;
   if (H >= 1.0)