The test for whether a segment has been flipped must use extended-precision coordinates to avoid integer overflow.