Public Function LinesIntersect( _
ByVal vLine1 As Variant _
, ByVal vLine2 As Variant _
) As Boolean Assuming
Dim varLine1 As Variant
Dim varLine2 As Variant
varLine1 = MakeLine(0, 1, 4, 2)
varLine2 = MakeLine(0, -1, 4, 4)
for example
LinesIntersect(varLine1, varLine2) = TrueSee also: LinesCounterClockwise Function
MakeLine FunctionvLine1: First of the two line segments that are checked to see if they intersect. vLine1 is assumed to be a Variant that contains a one-dimensional array of "points" where the lower-bound element represents one point and the upper-bound element represents another. Each "point" is in turn a one-dimensional array of Variant values where the lower-bound element represents the X coordinate and the upper-bound element represents the Y coordinate. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.