Distance and Midpoint Formulae