Explorar el Código

evil error in RGBtoHSV color conversion

Sven Sickert hace 10 años
padre
commit
e28f2dfb0c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      baselib/cc.cpp

+ 1 - 1
baselib/cc.cpp

@@ -270,7 +270,7 @@ double ColorConversion::ccmax(double val1, double val2, double val3)
 
      if      ( r == var_Max ) *h = del_B - del_G;
      else if ( g == var_Max ) *h = ( 1./3 ) + del_R - del_B;
-     else if ( g == var_Max ) *h = ( 2./3 ) + del_G - del_R;
+     else if ( b == var_Max ) *h = ( 2./3 ) + del_G - del_R;
 
      if ( *h < 0 ) *h += 1;
      if ( *h > 1 ) *h -= 1;