Line overlapping rectangle

Monkey Forums/Monkey Programming/Line overlapping rectangle

Raz(Posted 2011) [#1]
I've tried googling but apparently I am wording it all wrong!

How can I do the following


Where lx1,ly1,lx2,ly2 are the line coordinates and rx1,ty1,rx2,ry2 are the rectangle coords?

Ta :)
-Chris


DruggedBunny(Posted 2011) [#2]
Egads, man, get thee to the greatest repository of general game-related code out there!

http://www.blitzbasic.com/codearcs/codearcs.php?code=2448
http://www.blitzbasic.com/codearcs/codearcs.php?code=1594


Raz(Posted 2011) [#3]
Oh my god, why didn't I look at the code archives?

Thank you


Warpy(Posted 2011) [#4]
oh man, I've just spent fifteen minutes writing a new example. I'd forgotten there's already one on bb.com!


Raz(Posted 2011) [#5]
Haha, and you wrote it too, right?

Sorry Warpy