Line Class
Container for line-related functions
Item Index
Methods
- lineInt static
- segmentsIntersect
Methods
lineInt
(
Array
static
-
l1
-
l2
-
precision
Compute the intersection between two lines.
Parameters:
-
l1
ArrayLine vector 1
-
l2
ArrayLine vector 2
-
precision
NumberPrecision to use when checking if the lines are parallel
Returns:
Array:
The intersection point.
segmentsIntersect
(
Boolean
-
p1
-
p2
-
q1
-
q2
Checks if two line segments intersects.
Parameters:
-
p1
ArrayThe start vertex of the first line segment.
-
p2
ArrayThe end vertex of the first line segment.
-
q1
ArrayThe start vertex of the second line segment.
-
q2
ArrayThe end vertex of the second line segment.
Returns:
Boolean:
True if the two line segments intersect