aboutsummaryrefslogtreecommitdiff
path: root/geo
diff options
context:
space:
mode:
Diffstat (limited to 'geo')
-rw-r--r--geo/geo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/geo/geo.go b/geo/geo.go
index 0fcff14..50ac4c7 100644
--- a/geo/geo.go
+++ b/geo/geo.go
@@ -14,7 +14,7 @@ func DistanceM(a, b geodist.Coord) float64 {
func Nearest(coords []geodist.Coord, target geodist.Coord) (int, float64) {
bestIndex := 0
bestDistance := math.Inf(1)
- for index := 0; index < len(coords); index++ {
+ for index := range coords {
distance := DistanceM(coords[index], target)
if distance < bestDistance {
bestIndex = index