Home > @jsplumb/connector-bezier > nearestPointOnCurve
#
nearestPointOnCurve() functionCalculates the nearest point to the given point on the given curve. The return value of this is a JS object literal, containing both the point's coordinates and also the 'location' of the point (see above).
Signature:
export declare function nearestPointOnCurve(point: PointXY, curve: Curve): { point: PointXY; location: number;};
#
ParametersParameter | Type | Description |
---|---|---|
point | PointXY | |
curve | Curve |
Returns:
{ point: PointXY; location: number; }