how do I find the formula for distance
Sorry typo. Its actually D = the square root of ((x[2] - x[1])^2 + (y[2] - y[1])^2))
You can use pythogorean formula.
Disance of what?
I think you may mean the formula for the distance between two points, which is:
D = the square root of ((x[2] - x[2])^2 + (y[2] - y[1])^2))
(I dont know how to add in the square root symbol)