Box the compass: Difference between revisions
→{{header|langur}}: modified output
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) (→{{header|langur}}: modified output) |
||
Line 3,218:
=={{header|langur}}==
{{works with|langur|0.6.
<lang langur>val .box = ["North", "North by east", "North-northeast", "Northeast by north",
"Northeast", "Northeast by east", "East-northeast", "East by north",
Line 3,233:
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]
writeln "index degrees compass point"
writeln "----- ------- -------------"
for .phi in .angles {
val .i = truncate(.phi x 32 / 360 + 0.5) rem 32 + 1
writeln $"\.i:
}</lang>
{{out}}
<pre>index
----- ------- -------------
1 0.00 North
2 16.87 North by east
4 33.75 Northeast by north
5 50.62 Northeast
9 84.38 East
10 101.25 East by south
12 118.13 Southeast by east
13 135.00 Southeast
14 151.87 Southeast by south
17 185.62 South
18 185.63 South by west
20 219.37 Southwest by south
21 219.38 Southwest
22 236.25 Southwest by west
25 270.00 West
26 286.87 West by north
28 303.75 Northwest by west
29 320.62 Northwest
30 320.63 Northwest by north
32 North by west 354.37▼
1 354.38 North
</pre>
=={{header|Liberty BASIC}}==
|