fractionOfProjectionToLine Method

Return the fractional coordinate of the projection of this instance x,y onto the line from startPoint to endPoint.

fractionOfProjectionToLine(startPoint: Point2d, endPoint: Point2d, defaultFraction: number = 0): number

Parameter Type Description
startPoint Point2d start point of line
endPoint Point2d end point of line
defaultFraction number fraction to return if startPoint and endPoint are equal.

Returns - number

Defined in

Last Updated: 15 March, 2024