Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Linear Intersection

Author
Message
Ekko
20
Years of Service
User Offline
Joined: 27th Apr 2004
Location:
Posted: 7th Jul 2006 08:35 Edited at: 7th Jul 2006 08:39
I didn't find this anywhere on this forum, so here you go; find the point of intersection of two 2D lines. I can't make it any simpler than this.



To make it work you must have X# and Y# global... or put it into a dll and use some "Get_Intersection_X()," "Get_Intersection_Y()" functions. Enjoy.

[EDIT]

or have two different functions and call them seperatly:

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th Jul 2006 12:26
I prefer the second one. Nice code

Login to post a reply

Server time is: 2024-11-23 03:14:37
Your offset time is: 2024-11-23 03:14:37