On Mon, Nov 2, 2009 at 11:01 AM, Chunk 1978 <chunk1...@gmail.com> wrote:
> float dist = pow(red - r, 2) + pow(green - g, 2) + pow(blue - b, 2);
>
> float dist = ((red - r) *  2) + ((green - g) * 2) + ((blue - b) * 2);

You are aware that x^2 != 2x, right?

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to