Home > @jsplumbtoolkit/browser-ui > pointOnLine
pointOnLine() function
Calculates a point on the line from fromPoint
to toPoint
that is distance
units along the length of the line.
Signature:
export declare function pointOnLine(fromPoint: PointXY, toPoint: PointXY, distance: number): PointXY;
Parameters
Parameter | Type | Description |
---|---|---|
fromPoint | PointXY | First point |
toPoint | PointXY | Second point |
distance | number | Distance along the length that the point should be located. |
Returns:
Point on the line, in the form { x:..., y:... }
.