t vertex <strong>A</strong>, we check the positions of their right endpoints. If the vertices <strong>B<sub>0</sub></strong>, <strong>B<sub>1</sub></strong>, and <strong>A</strong> form a clockwise pattern, then <strong>AB<sub>0</sub></strong> is closer to <strong>P</strong> than <strong>AB<sub>1</sub></strong>.</p>
<h3 id="right-case"><a class="header" href="#right-case">Right Case</a></h3>
<p><img src="overlay/extract/segment_under_segment_b.svg" alt="Right Case" /></p>
<p>When both segments share a commo