Distance between points in a coordinate plane