Edge Collision Detection
When a moving object's position passes a boundary, multiply the velocity component perpendicular to that boundary by -1 so the object reflects back into bounds.
When a moving object's position passes a boundary, multiply the velocity component perpendicular to that boundary by -1 so the object reflects back into bounds.