This function calculates the Euclidean distance between two points, typically in a matrix.
distance(x1, y1, x2, y2)
X-coordinate of the first point.
Y-coordinate of the first point.
X-coordinate of the second point.
Y-coordinate of the second point.
Euclidean distance between the two points.