Home > @jsplumb/util > lineRectangleIntersection
#
lineRectangleIntersection() functionFinds all points where the given line intersects the given rectangle.
Signature:
export declare function lineRectangleIntersection(line: LineXY, r: RectangleXY): Array<PointXY>;
#
ParametersParameter | 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.