[magick-developers] gem.c:464 Redundant operations?
Serabe
serabe at gmail.com
Thu May 15 14:47:33 PDT 2008
Hello, everybody,
my name is Sergio Rodríguez Arbeo and I'm a GSoC (Google Summer of
Code) student working on RMagick4J (the port of RMagick to JRuby).
Because of this, I have to read code of both RMagick and ImageMagick.
In the line 464 of the gem.c file, there is the following expression:
(( ((max-b)/6.0)+ (delta/2.0))- (((max-g)/6.0)+(delta/2.0)))/delta;
I think it is equals to the expression:
(g-b)*delta/6.0
What do you think?
Regards,
Serabe (Sergio Rodríguez Arbeo)
P.S. This is the way I figure out the new expression:
(( ((max-b)/6.0)+ (delta/2.0))- (((max-g)/6.0)+(delta/2.0)))/delta;
(( (max-b)/6.0)+ (delta/2.0)- ((max-g)/6.0)-(delta/2.0))/delta;
(( (max-b)/6.0) - ((max-g)/6.0))/delta;
( ( (max-b) - (max-g) )/6.0 )/delta
( ( max - b - max + g )/6.0 )/delta
( (- b + g )/6.0 )/delta
( (g - b)/6.0 )/delta
(g - b) * delta /6.0
--
http://www.serabe.com
More information about the Magick-developers
mailing list