five-on-it / packages/catalogue/src/city/lines / snap
Function: snap()
snap(
points,target,reach?):Pt[] |undefined
Defined in: packages/catalogue/src/city/lines.ts:395
A polyline whose last point lies on target: cut where it first crosses it walking back from its end, else its last segment stretched (up to reach metres) until it meets it. Nothing when it neither crosses nor reaches.
Parameters
points
readonly Pt[]
target
readonly Pt[]
reach?
number = REACH
Returns
Pt[] | undefined