Appearance
geometry.lines
geometry.lines.isPointInLine(px, py, x1, y1, x2, y2, width, margin, isTriangle)
Arguments
- px
number - py
number - x1
number - y1
number - x2
number - y2
number - width
numberWidth of the line - margin
number - isTriangle
boolean
Returns
-
boolean
geometry.lines.lineIntersection(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1)
Arguments
- ax0
numberThe X coordinate of the start point of the first line. - ay0
numberThe Y coordinate of the start point of the first line. - ax1
numberThe X coordinate of the end point of the first line. - ay1
numberThe Y coordinate of the end point of the first line.v - bx0
numberThe X coordinate of the start point of the second line. - by0
numberThe Y coordinate of the start point of the second line. - bx1
numberThe X coordinate of the end point of the second line. - by1
numberThe Y coordinate of the end point of the second line.
geometry.lines.segmentIntersection(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1)
Arguments
- ax0
numberThe X coordinate of the start point of the first line. - ay0
numberThe Y coordinate of the start point of the first line. - ax1
numberThe X coordinate of the end point of the first line. - ay1
numberThe Y coordinate of the end point of the first line.v - bx0
numberThe X coordinate of the start point of the second line. - by0
numberThe Y coordinate of the start point of the second line. - bx1
numberThe X coordinate of the end point of the second line. - by1
numberThe Y coordinate of the end point of the second line.
geometry.lines.segmentRectangleIntersection(ax, ay, bx, by, minX, minY, maxX, maxY)
Arguments
- ax
Number - ay
Number - bx
Number - by
Number - minX
Number - minY
Number - maxX
Number - maxY
Number
Returns
-
Array<Point>
geometry.lines.twoSegmentsIntersect(p1, p2, p3, p4[, excludeBoundaries])
Arguments
- p1
PointFirst extremity of the first segment - p2
PointSecond extremity of the first segment - p3
PointFirst extremity of the second segment - p4
PointSecond extremity of the second segment - excludeBoundaries(optional)
boolean[=false]If true, the segment will not be considered as intersecting if the intersection point is one of their extremities
Returns
-
boolean