Mail Archives: djgpp/1997/08/26/01:37:28
Given 3 points, you can know whether they are collinear or not without
plotting the line.
Just build the equation from any two of them, then substitute the third
one into the equation. Check for some zero or nearly zero value.
Einstein
einstein DOT lam AT usa DOT net
> On Thu, 14 Aug 1997, Thomas Harte wrote:
>
> > Hi
> >
> > I want to know in Allegro if a line I draw intersects a point I know. Is
> > there a way to do this using Allegro, or should I just implement my own line
> > algorithm? The reason I ask is that I am doing the level editor for my next
> > project, and obviously when you try to click and drag a line it would be
> > necessary for me to know which line you are attempting to click and drag . . .
> >
> > Or, can you think of another way for me to do this? There is in theory
> > no maximum number of lines on screen, although maps above a certain complexity
> > probably won't be created for runtime speed reasons if nothing else.
> >
> > -Thomas
- Raw text -