Changed distance to use magnitude of difference vector instead of hypotenuse stuff