Skip to content
Snippets Groups Projects
Commit 608667a0 authored by Andy Perkins's avatar Andy Perkins Committed by Alex Reisner
Browse files

Fix: compass_point (#1372)

Fix: compass_point, 341-348 degrees missing value in 16-wind compass rose
parent 5a963b17
No related branches found
No related tags found
No related merge requests found
......@@ -154,7 +154,7 @@ module Geocoder
# Translate a bearing (float) into a compass direction (string, eg "North").
#
def compass_point(bearing, points = COMPASS_POINTS)
seg_size = 360 / points.size
seg_size = 360.0 / points.size
points[((bearing + (seg_size / 2)) % 360) / seg_size]
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment