Fix find_first_ge.

debian-sid
Tom Payne 15 years ago
parent 98b815043d
commit 8d94167ddd

@ -10,7 +10,6 @@ Filter out non-thermals
Don't display thermal folder if no thermals!
MEDIUM
Fix find_first_ge test failures
Add nice thermal and glide icons
Add graphs and tracks of other variables (e.g. airspeed)
Clean up air speed track (average)

@ -171,16 +171,14 @@ def find_first_ge(seq, value, cmp=__builtin__.cmp):
while left < right:
middle = (left + right) / 2
direction = cmp(value, seq[middle])
if direction < 0:
right = middle - 1
elif direction == 0:
if direction <= 0:
right = middle
else:
left = middle + 1
if left == len(seq):
return None
else:
return left
return right
def salient(seq, epsilon=0):

Loading…
Cancel
Save