aboutsummaryrefslogtreecommitdiff
path: root/src/util/array.py
diff options
context:
space:
mode:
authorJoris2020-06-06 10:09:27 +0200
committerJoris2020-06-06 10:09:27 +0200
commit6b9195000eb5404c247288b384d7ca2bacc1ab23 (patch)
treed36d669b70d2a5f2789335e814489cd641fbae3e /src/util/array.py
parentb244640288648f27ce1fc7be3f175703e0a3412b (diff)
Add unit tests
Diffstat (limited to 'src/util/array.py')
-rw-r--r--src/util/array.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/array.py b/src/util/array.py
index 7dd0357..bb4eee3 100644
--- a/src/util/array.py
+++ b/src/util/array.py
@@ -1,5 +1,5 @@
def insert_position(x, xs, is_reversed: bool) -> int:
for i, y in enumerate(xs):
- if is_reversed and x > y or not is_reversed and x < y:
+ if is_reversed and x >= y or not is_reversed and x <= y:
return i
return len(xs)