Simplified distance calculation code.

- It is now easier to just call the distance function to calculate
collision detection instead of reassigning variables and values.