Box the compass: Difference between revisions

Content added Content deleted
(J: bugfix)
(J: subliminal bug fix)
Line 27: Line 27:
tween=:1 :'[,m,tolower@]'
tween=:1 :'[,m,tolower@]'
by=:' by 'tween
by=:' by 'tween
points=:,2 ([;by;'-'tween;by~)&>/\ cardinal
indice=: 32 | 0.5 <.@+ %&11.25
fixup=: (rplc ''|.@;{.@;:@tolower) ^:(' '&e.)L:0
fixup=: (rplc ''|.@;{.@;:@tolower) ^:(' '&e.)L:0
points=:fixup ,2 ([;by;'-'tween;by~)&>/\ cardinal
deg2pnt=: [:fixup points {~ indice</lang>
indice=: 32 | 0.5 <.@+ %&11.25
deg2pnt=: points {~ indice</lang>


As for the required example, sometimes it's simpler to do just a small bit of "extra" work:
As for the required example, sometimes it's simpler to do just a small bit of "extra" work: