Re: Comparing NSColor instances
Re: Comparing NSColor instances
- Subject: Re: Comparing NSColor instances
- From: John Stiles <email@hidden>
- Date: Mon, 5 Nov 2007 07:18:35 -0800
On Nov 4, 2007, at 6:58 PM, Ricky Sharp wrote:
Also, I'm never keen on doing exact compares on floating point
values, so I may add in a bit of "slop" to the compare. On the
other hand, if I do normalize two colors to the same color space,
it should be reasonable to assume it will have identical valued
components.
Use the slop. I can easily envision a scenario where converting RGB-
>CMYK->RGB could introduce error. Just because the algebra cleanly
reduces out to nothing doesn't mean the CPU will introduce zero error
along the way.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden