To measure the distance between two points on Earth, we use Euclidean geometry. This famous mathematical theorem states that the distance between two points is simply the length of a straight line connecting them. To find out exactly how far apart two points are, we take the square root of this sum:
d = sqrt(x2 + y2)