If the two four-bit codes contain a 1-bit in the same position; this implies that P and Q are on the same side of a rectangle edge, so that nothing has to be drawn.
- 4. Some Classic Algorithms
- from Computer Graphics for Java Programmers, Second Edition
- Publisher: John Wiley & Sons
- Released: March 2007
so just code1 XOR code2 & 0x0F > 0
Share this highlighthttp://www.safaribooksonline.com/a/computer-graphics-for/445597/