Figure 2—This flowchart shows half of the logic necessary to test for semicircle boundary crossings. Prior to executing this logic, the Sflag was tested and found to be set.