<div dir="auto"><div>What do you think about:<div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif;font-size:14px">function ComparePoints(P1, P2: TPoint): TPoint;</span><br style="font-family:sans-serif;font-size:14px"><span style="font-family:sans-serif;font-size:14px">begin</span><br style="font-family:sans-serif;font-size:14px"><span style="font-family:sans-serif;font-size:14px"> Result.X := (P1.X - P2.X);</span><br style="font-family:sans-serif;font-size:14px"><span style="font-family:sans-serif;font-size:14px"> Result.Y := (P1.Y - P2.Y);</span><br style="font-family:sans-serif;font-size:14px"><span style="font-family:sans-serif;font-size:14px">end;</span><br></div><div class="gmail_extra"><br><div class="gmail_quote" dir="auto">Best regards. </div><div class="gmail_quote" dir="auto"><br></div><div class="gmail_quote" dir="auto">Sandro Cumerlato </div><div class="gmail_quote" dir="auto"><br></div><div class="gmail_quote" dir="auto"><br></div><div class="gmail_quote">On Jul 26, 2017 3:56 PM, "Alexey via Lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think LCL has many CompareNNNN funcs, but misses func for TPoint. Here it's comparing x/y screen coordinates<br>
<br>
function ComparePoints(P1, P2: TPoint): integer;<br>
begin<br>
if (P1.X=P2.X) and (P1.Y=P2.Y) then exit(0);<br>
if (P1.Y>P2.Y) then exit(1);<br>
if (P1.Y<P2.Y) then exit(-1);<br>
if (P1.X>P2.X) then exit(1) else exit(-1);<br>
end;<font color="#888888"><br>
<br>
<br>
-- <br>
Regards,<br>
Alexey<br>
<br>
-- <br>
______________________________<wbr>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus-ide.org" target="_blank">Lazarus@lists.lazarus-ide.org</a><br>
<a href="https://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">https://lists.lazarus-ide.org/<wbr>listinfo/lazarus</a><br>
</font></blockquote></div><br></div></div></div>