1

Fixing unit error

This commit is contained in:
Alex Yatskov 2015-08-24 18:50:52 +09:00
parent f5e331d5fb
commit 31d6d6bccd

View File

@ -186,7 +186,7 @@ func computeRecordGeo(entries []record, context queryContext) {
if distUserRange > 0 { if distUserRange > 0 {
nearby = -((entry.DistanceToUser-distUserMin)/distUserRange - 0.5) * 2.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.Max(accessible, -1.0)
accessible = math.Min(accessible, 1.0) accessible = math.Min(accessible, 1.0)
} }