O'Reilly logo
  • Ruben Laguna thinks this is interesting:

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.


Cover of Computer Graphics for Java Programmers, Second Edition


so just code1 XOR code2 & 0x0F > 0