From 9a9f35d9c25e48349e97ce16773cf3a5bf358cfc Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Tue, 5 Jul 2016 17:41:15 +0200 Subject: [PATCH] Fix silly typos spotted by jgoizueta (WIP) --- .../cartodb_services/cartodb_services/mapzen/isolines.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py b/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py index 5ecfa79..0e89ef4 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapzen/isolines.py @@ -57,10 +57,10 @@ class MapzenIsolines: # let's refine the solution, binary search for j in xrange(0, self.NUMBER_OF_ANGLES): if errors[j] > 0: - rmax[j] = (rmax[j] - rmin[j]) / 2.0 + rmax[j] = (rmax[j] + rmin[j]) / 2.0 else: - rmin[j] = (rmax[j] - rmin[j]) / 2.0 - location_estimates[j] = self._calculate_dest_location(origin, angles[j], (rmax[j]-rmin[j])/2.0) + rmin[j] = (rmax[j] + rmin[j]) / 2.0 + location_estimates[j] = self._calculate_dest_location(origin, angles[j], (rmax[j]+rmin[j])/2.0) # and check "actual" costs again resp = self._matrix_client.one_to_many([origin] + location_estimates, 'pedestrian')