On Oct 5, 2010, at 11:18 AM, Amy Heavey wrote: > I changed it to > 299 and voila it worked. I did also have to (is the term > cast?) the 299 to a float.
Yes, the term is "cast". No you didn't need to cast 299 to a float. It's not wrong to do so, just unnecessary. (And, if you care, you could instead just write 299.0, or 299f, or 299.0f.) You could also just use if( x >= 300 ). If you were using fractional pixels anywhere, you'd want x = 0 instead of x = x-300, so that rounding errors would not accumulate. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice _______________________________________________ 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