From dccb9f24249e9503e6c294c0ab076121d2c158c8 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Wed, 26 Sep 2012 17:32:09 +0200 Subject: [PATCH] Fixes issues #434 and #431 --- profile.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile.lua b/profile.lua index 358430d8a..8146a162e 100644 --- a/profile.lua +++ b/profile.lua @@ -124,7 +124,7 @@ function way_function (way, numberOfNodesInWay) (speed_profile[man_made] ~= nil and speed_profile[man_made] > 0) then if durationIsValid(duration) then - way.speed = parseDuration / math.max(1, numberOfSegments-1); + way.speed = math.max( duration / math.max(1, numberOfNodesInWay-1) ); way.is_duration_set = true; end way.direction = Way.bidirectional;