Determines the intersection point of the line defined by points A and B with the line defined by points C and D. If the intersection point was found, then its position is stored in point I. If there is no determinable intersection point, then point I remains unchanged.
SYNTAX:
success% = LineIntersection% (Ax#, Ay#, Bx#, By#, Cx#, Cy#, Dx#, Dy#, Ix#, Iy#)
INPUTS:
Ax#, Ay# (DOUBLEs)
Bx#, By# (DOUBLEs)
- The x/y coordinates of the start point (A) of the first line and its related endpoint (B).
Cx#, Cy# (DOUBLEs)
Dx#, Dy# (DOUBLEs)
- The x/y coordinates of the start point (C) of the second line and its related endpoint (D).
Ix#, Iy# (DOUBLE variables)
- These must be two type DOUBLE variables, where the x/y coordinates of the intersection point will be stored on success, note this is an intended argument side effect. On failure the values of the given variables remain unchanged.
RESULT:
success% (INTEGER)
- This flag is true (-1) on success or false (0) on failure. On success the intersection point is stored in the given variables (Ix#, Iy#).