Skip to main content

Home > @jsplumbtoolkit/browser-ui > lineRectangleIntersection

lineRectangleIntersection() function

Finds all points where the given line intersects the given rectangle.

Signature:

export declare function lineRectangleIntersection(line: LineXY, r: RectangleXY): Array<PointXY>;

Parameters

ParameterTypeDescription
lineLineXY
rRectangleXY

Returns:

Array<PointXY>

An array of intersection points. If there are no intersection points the array will be empty, but never null.