1
This commit is contained in:
Alex Yatskov 2015-07-31 13:30:59 +09:00
parent 9b364d1c6d
commit 30ca2305b1

View File

@ -185,7 +185,7 @@ func computeRecordGeo(entries records, 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 * 1000))
accessible = math.Max(accessible, -1.0) accessible = math.Max(accessible, -1.0)
accessible = math.Min(accessible, 1.0) accessible = math.Min(accessible, 1.0)
} }