Hi. now i making some problem with JAVA, but don't remember how get lenght between to coordinate-system.
Ex. point A (3,7) Point B (7,59)
I want to know how count distance between point a and b. very thanks for your answers. :-)
Hi. now i making some problem with JAVA, but don't remember how get lenght between to coordinate-system.
Ex. point A (3,7) Point B (7,59)
I want to know how count distance between point a and b. very thanks for your answers. :-)
A = (xa, ya), B = (xb, yb)
Assuming you want euclidean distance ("natural" distance):
distance = sqrt((xa - xb)^2 + (ya - yb)^2).
pythagoras gave that answer
sqrt(((A.X - B.X) * (A.X - B.X)) + (((A.Y - B.Y) * (A.Y - B.Y)));
dx = PointA.x - PointB.x;
dy = PointA.y - PointB.y;
dist_squared = dx*dx + dy*dy;
dist = Math.sqrt(dist_squared);