Hboxdistance sqrtDelta x2Delta y2sqrtx_2-x_12 y_2-y_12. The distance between two points in Euclidean space is the length of a straight line between them but on the sphere there are no straight lines. The linear distance between the two points is the square root of the sum of the squared values of the x-axis distance and the y-axis distance.
Note that the formula works whether P is inside or outside the circle.
In spaces with curvature straight lines are replaced by geodesics. Distance between two points sqrtx_B-x_A2y_B-y_A2 Solution. The distance between two points calculation formula is similar to the right triangle rule where the squared hypotenuse is equal to the sum of the squares of the other two sides. In spaces with curvature straight lines are replaced by geodesics.