How do you find the distance between two points and their midpoint