determine line intersecting with rect?

Blitz3D Forums/Blitz3D Programming/determine line intersecting with rect?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm sure there was a line routine on the code archives that clips to the screen boundary, by Skidracer I think, which may be helpful. From memory though it may be embedded in another bit of code by Blitz Support.

Here... http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=380

Edit. You could of course just use a viewport but if you need the new endpoints then an adaptation of this should be able to provide them.