PIXI.lineIntersection

lineIntersection(aStart: IPointData, aEnd: IPointData, bStart: IPointData, bEnd: IPointData, outPoint: IPointData) → {IPointData}

Computes the point where non-coincident and non-parallel Lines intersect. Coincident or parallel lines return a NaN point {x: NaN, y: NaN}. The intersection point may land outside the extents of the lines.

Note: Only available with @pixi/math-extras.

Parameters:
Name Type Description
aStart IPointData

First point of the first line.

aEnd IPointData

Second point of the first line.

bStart IPointData

First point of the second line.

bEnd IPointData

Second point of the second line.

outPoint IPointData

A Point-like object in which to store the value, optional (otherwise will create a new Point).

Returns:
Type Description
IPointData

The point where the lines intersect or a NaN Point.

Powered by webdoc!