Advertisement

lines intersecting

Started by May 18, 2001 11:16 PM
0 comments, last by Scooter 23 years, 8 months ago
how do you know when two line segments intersect each other?
We are here just like this,It really doesn't matter why.The world is here like it is,'We could laugh we could cry.Is it good or is it bad,Wright or maybe wrong?There's no use of being sad,Without a purpose within a song.
nevermind....

r = ( ((ay - cy) * (dx - cx)) - ((ax - cx) * (dy - cy)) ) /
( ((bx - ax) * (dy - cy)) - ((by - ay) * (dx - cx)) );

s = ( ((ay - cy) * (bx - ax)) - ((ax - cx) * (by - ay)) ) /
( ((bx - ax) * (dy - cy)) - ((by - ay) * (dx - cx)) );

if ( r < 0.0f || r > 1.0f || s < 0.0f || s > 1.0f )
return false;
else
return true;
We are here just like this,It really doesn't matter why.The world is here like it is,'We could laugh we could cry.Is it good or is it bad,Wright or maybe wrong?There's no use of being sad,Without a purpose within a song.

This topic is closed to new replies.

Advertisement