Only refine individual solutions when error > TOLERANCE
This commit is contained in:
@@ -56,6 +56,8 @@ 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 abs(errors[j]) > self.TOLERANCE:
|
||||||
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:
|
||||||
|
|||||||
Reference in New Issue
Block a user