Calculate the distance between two points in 2D or 3D space using the distance formula.
Distance between points.