Calculate the straight-line distance between two (x, y) points using the distance formula, derived from the Pythagorean theorem.
Formula
d = √((x2−x1)² + (y2−y1)²)