||Building a Game Engine with Cocoa, Part 2|
|Subject:||Incorrect Boolean login in NOTEQUAL_NSPOINTS?|
Response to: Incorrect Boolean login in NOTEQUAL_NSPOINTS?
Joe, That's a great catch. According to DeMorgan's law, you're absolutely correct. The reason this typo (from where I'd cut/pasted the previous macro) didn't surface in the execution of the program as presented is that in all cases valid NSPoints were being compared to NIL_POINT. Thus, the sub-expressions always evaluate to NO. i.e. (NO && NO == NO) and (NO || NO == NO) and it didn't make a difference as far as the end result was concerned. When you compare a valid point to another valid point, however, there would have certainly been a noticeable bug in place.
FIXED: Incorrect Boolean login in NOTEQUAL_NSPOINTS?
2007-01-12 06:52:49 wootest [View]