X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=extra%2Fjamshred%2Ftunnel%2Ftunnel.factor;h=f9b353b85f278f4a62c384e696d8cb38eef470fe;hp=96992c3b8cd82d88fb731d3a81151d364fa91aaa;hb=6d4293b5822d769619f66e46e64b704ddfe41b43;hpb=b7bb69b178712e9d135362ebd6efa69c9b8371ba diff --git a/extra/jamshred/tunnel/tunnel.factor b/extra/jamshred/tunnel/tunnel.factor index 96992c3b8c..f9b353b85f 100644 --- a/extra/jamshred/tunnel/tunnel.factor +++ b/extra/jamshred/tunnel/tunnel.factor @@ -86,14 +86,14 @@ CONSTANT: default-segment-radius 1 next current half-way-between-oints :> h cf h vdot cf location vdot - cf heading vdot / ; -: vector-to-centre ( seg loc -- v ) +: vector-to-center ( seg loc -- v ) over location>> swap v- swap forward>> proj-perp ; -: distance-from-centre ( seg loc -- distance ) - vector-to-centre norm ; +: distance-from-center ( seg loc -- distance ) + vector-to-center norm ; : wall-normal ( seg oint -- n ) - location>> vector-to-centre normalize ; + location>> vector-to-center normalize ; CONSTANT: distant 1000