1

How do you take the x and y coordinates of Variable a and the x and y coordinates of Variable b

and then calculate the distance between them?

kaan
  • 11

1 Answers1

1

If you have two points in the plane $A(x_a, y_a)$ and $B(x_b, y_b)$, the distance between them is given by: $$d(A, B)=\sqrt{(x_a-x_b)^2+(y_a-y_b)^2}.$$ Some more detailed explanation you can find for example here: https://www.mathsisfun.com/algebra/distance-2-points.html

Emilio Novati
  • 62,675
Iulia
  • 1,306