PIXI.segmentIntersection
segmentIntersection(aStart: IPointData, aEnd: IPointData, bStart: IPointData, bEnd: IPointData, outPoint: IPointData) → {IPointData}
Computes the point where non-coincident and non-parallel segments intersect.
Coincident, parallel or non-intersecting segments return a NaN
point {x: NaN, y: NaN}
.
The intersection point must land inside the extents of the segments or return a NaN
Point.
Note: Only available with @pixi/math-extras.
Name | Type | Description |
---|---|---|
aStart | IPointData |
Starting point of the first segment. |
aEnd | IPointData |
Ending point of the first segment. |
bStart | IPointData |
Starting point of the second segment. |
bEnd | IPointData |
Ending point of the second segment. |
outPoint | IPointData |
A Point-like object in which to store the value, optional (otherwise will create a new Point). |
Type | Description |
---|---|
IPointData |
The point where the segments intersect or a |