Skip to content

Commit ff8f965

Browse files
compass wraps around to north
1 parent 7944738 commit ff8f965

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pages/parks-by-compass-points/far-from-home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
const miles = dist(coord)
164164
const group = Math.round(miles)
165165
const compass = bearing(coord)
166-
const fold = ['North','East','South','West'][Math.trunc((compass+45)/90)]
166+
const fold = ['North','East','South','West','North'][Math.trunc((compass+45)/90)]
167167
const label = `${fold} ${miles.toFixed(2)} miles at ${compass}°`
168168
return {group, coord, label}
169169
})

0 commit comments

Comments
 (0)