SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Get distance between 2 points

Use Distance function for detecting distance between 2 points.
XPos and YPos are coordinates of the first point and X and Y are coordinates of the second point.

uses Math;
...
function Distance(XPos, YPos, X, Y: Real): Real;
begin
  Result:=sqrt(
    Power(XPos-X,2)+Power(YPos-Y,2));
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes