try the distance equation $d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}$ where (x1, y1) and (x2, y2) are points