Fixing unit error
This commit is contained in:
parent
f5e331d5fb
commit
31d6d6bccd
2
util.go
2
util.go
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user