distance-to-next-segment ( current next location heading -- distance )


Vocabulary
jamshred.tunnel

Inputs
currentan object
nextan object
locationan object
headingan object


Outputs
distancean object


Definition


:: distance-to-next-segment
( current next location heading -- distance )
current forward>> :> cf cf next location>> vdot
cf location vdot - cf heading vdot / ;