chainDistanceToFragmentIndex MethodProtected

Return the index of the PathFragment at the given distance along the chain.

chainDistanceToFragmentIndex(distance: number, allowExtrapolation: booleanfalse): undefined | number

Parameter Type Description
distance number distance along the chain.
allowExtrapolation boolean if true, returns 0 for negative distances and returns last fragment index for
distances larger than curve length. If false returns undefined for those out of bound distances.

Returns - undefined | number

Defined in

Last Updated: 14 November, 2024