keep momentum from taking you outside of the boundaries