• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Comparing NSColor instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Comparing NSColor instances (From: Ricky Sharp <email@hidden>)
 >Re: Comparing NSColor instances (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Converting *u unicode hex sequences
  • Next by Date: Re: NSInvocation problem - "NSView not correctly initialized"
  • Previous by thread: Re: Comparing NSColor instances
  • Next by thread: Re: Comparing NSColor instances
  • Index(es):
    • Date
    • Thread