diff options
Diffstat (limited to 'geo/geo.go')
| -rw-r--r-- | geo/geo.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |
