From 512e95275d77cc2263925d980faf41fa599d0149 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 24 Aug 2015 18:50:52 +0900 Subject: [PATCH] Fixing unit error --- util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.go b/util.go index f25be9e..808b32e 100644 --- a/util.go +++ b/util.go @@ -186,7 +186,7 @@ func computeRecordGeo(entries []record, context queryContext) { if distUserRange > 0 { nearby = -((entry.DistanceToUser-distUserMin)/distUserRange - 0.5) * 2.0 - accessible = 1.0 - (entry.DistanceToStn / (context.walkingDist * 1000)) + accessible = 1.0 - entry.DistanceToStn/context.walkingDist accessible = math.Max(accessible, -1.0) accessible = math.Min(accessible, 1.0) }