I have two points (x1,y1) and (x2,y2). I want to know whether the points are within 5 meters of one another.
Given points (X1,Y1) and (X2,Y2) then:
dX = X1 - X2; dY = Y1 - Y2; if (dX*dX + dY*dY > (5*5)) { //your code }