Fix silly typos spotted by jgoizueta (WIP)

This commit is contained in:
Rafa de la Torre 2016-07-05 17:41:15 +02:00
parent 9becf1adb4
commit 9a9f35d9c2

View File

@ -57,10 +57,10 @@ class MapzenIsolines:
# let's refine the solution, binary search # let's refine the solution, binary search
for j in xrange(0, self.NUMBER_OF_ANGLES): for j in xrange(0, self.NUMBER_OF_ANGLES):
if errors[j] > 0: if errors[j] > 0:
rmax[j] = (rmax[j] - rmin[j]) / 2.0 rmax[j] = (rmax[j] + rmin[j]) / 2.0
else: else:
rmin[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) location_estimates[j] = self._calculate_dest_location(origin, angles[j], (rmax[j]+rmin[j])/2.0)
# and check "actual" costs again # and check "actual" costs again
resp = self._matrix_client.one_to_many([origin] + location_estimates, 'pedestrian') resp = self._matrix_client.one_to_many([origin] + location_estimates, 'pedestrian')