Skip to main content

Home > @jsplumbtoolkit/browser-ui > nearestPointOnCurve

nearestPointOnCurve() function

Calculates 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;
};

Parameters

ParameterTypeDescription
pointPointXY
curveCurve

Returns:

{ point: PointXY; location: number; }