Add a midpoint function to the vector helpers