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
Parameter | Type | Description |
---|---|---|
line | LineXY | |
r | RectangleXY |
Returns:
Array<PointXY>
An array of intersection points. If there are no intersection points the array will be empty, but never null.