rot dup length swap <slice> find-nearest-segment ;
: nearest-segment-backward ( segments oint start -- segment )
rot dup length swap <slice> find-nearest-segment ;
: nearest-segment-backward ( segments oint start -- segment )
: nearest-segment ( segments oint start-segment -- segment )
#! find the segment nearest to 'oint', and return it.
: nearest-segment ( segments oint start-segment -- segment )
#! find the segment nearest to 'oint', and return it.
: heading-segment ( segments current-segment heading -- segment )
#! the next segment on the given heading
: heading-segment ( segments current-segment heading -- segment )
#! the next segment on the given heading