Skip to main content

Home > @jsplumbtoolkit/browser-ui > gradientAtPointAlongPathFrom

gradientAtPointAlongPathFrom() function

Returns the gradient of the curve at the point which is 'distance' from the given location. if this point is greater than location 1, the gradient at location 1 is returned. if this point is less than location 0, the gradient at location 0 is returned.

Signature:

export declare function gradientAtPointAlongPathFrom(curve: Curve, location: number, distance: number): number;

Parameters

ParameterTypeDescription
curveCurve
locationnumber
distancenumber

Returns:

number

a decimal between 0 and 1 inclusive.