Line collision with rectangle

...it may be taxing