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
number
Width of the line - margin
number
- isTriangle
boolean
Returns
-
boolean
geometry.lines.lineIntersection(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1)
Arguments
- ax0
number
The X coordinate of the start point of the first line. - ay0
number
The Y coordinate of the start point of the first line. - ax1
number
The X coordinate of the end point of the first line. - ay1
number
The Y coordinate of the end point of the first line.v - bx0
number
The X coordinate of the start point of the second line. - by0
number
The Y coordinate of the start point of the second line. - bx1
number
The X coordinate of the end point of the second line. - by1
number
The Y coordinate of the end point of the second line.
geometry.lines.segmentIntersection(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1)
Arguments
- ax0
number
The X coordinate of the start point of the first line. - ay0
number
The Y coordinate of the start point of the first line. - ax1
number
The X coordinate of the end point of the first line. - ay1
number
The Y coordinate of the end point of the first line.v - bx0
number
The X coordinate of the start point of the second line. - by0
number
The Y coordinate of the start point of the second line. - bx1
number
The X coordinate of the end point of the second line. - by1
number
The 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
Point
First extremity of the first segment - p2
Point
Second extremity of the first segment - p3
Point
First extremity of the second segment - p4
Point
Second 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