Yes, forgot to add that. Its just the classic way to calculate distances in geometry. (a and b beeing the "x" and "y" distances between the objects positions)
-> its more useful when you dont want the (z) hight of the objects to influence the distance.