Box the compass: Difference between revisions
Content added Content deleted
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 3,218: | Line 3,218: | ||
=={{header|langur}}== |
=={{header|langur}}== |
||
{{works with|langur|0.6.8}} |
|||
<lang langur>val .box = ["North", "North by east", "North-northeast", "Northeast by north", |
<lang langur>val .box = ["North", "North by east", "North-northeast", "Northeast by north", |
||
"Northeast", "Northeast by east", "East-northeast", "East by north", |
"Northeast", "Northeast by east", "East-northeast", "East by north", |
||
Line 3,232: | Line 3,233: | ||
185.63, 202.5, 219.37, 219.38, 236.25, 253.12, 253.13, 270.0, |
185.63, 202.5, 219.37, 219.38, 236.25, 253.12, 253.13, 270.0, |
||
286.87, 286.88, 303.75, 320.62, 320.63, 337.5, 354.37, 354.38] |
286.87, 286.88, 303.75, 320.62, 320.63, 337.5, 354.37, 354.38] |
||
val .padL = f(.s, .with, .len) .with x (.len - len(.s)) ~ .s |
|||
for .phi in .angles { |
for .phi in .angles { |
||
val .i = truncate(.phi x 32 / 360 + 0.5) rem 32 + 1 |
val .i = truncate(.phi x 32 / 360 + 0.5) rem 32 + 1 |
||
writeln $"\ |
writeln $"\.i:2; \.box[.i]:18; \.phi;" |
||
}</lang> |
}</lang> |
||