From d1b0ab1930acf282f55ed0cb2ffacfb3467e5f54 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 19 Jul 2014 03:00:12 +0200 Subject: [PATCH] update progress --- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 7ef6107912..eae91e3be7 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -877,8 +877,8 @@ public class RoutingHelper { @Override public void run() { if (isRouteBeingCalculated()) { - float p = calculationProgress.distanceFromBegin + calculationProgress.distanceFromEnd; - float all = calculationProgress.totalEstimatedDistance * 1.5f; + float p = Math.max(calculationProgress.distanceFromBegin, calculationProgress.distanceFromEnd); + float all = calculationProgress.totalEstimatedDistance * 1.25f; if (all > 0) { int t = (int) Math.min(p * p / (all * all) * 100f, 99); progressRoute.updateProgress(t);