summaryrefslogtreecommitdiff
path: root/interval_utils.py
diff options
context:
space:
mode:
authorSpitfireX <timm.weber@me.com>2015-08-12 17:06:05 +0200
committerSpitfireX <timm.weber@me.com>2015-08-12 17:06:05 +0200
commitc61c5b52ba496ee4cc684d43117111ec7d351c0b (patch)
treeff21efc6b8c8244654d180fe783fc69aa2df5620 /interval_utils.py
parentfe68aaacee5d63bd66eb047c01ed52f30718b27d (diff)
potentially buggy check_point_in_interval
Diffstat (limited to 'interval_utils.py')
-rw-r--r--interval_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/interval_utils.py b/interval_utils.py
index 977b583..8557760 100644
--- a/interval_utils.py
+++ b/interval_utils.py
@@ -58,4 +58,7 @@ def check_point_in_interval(origin, p, interval):
if ang >= interval[0] and ang <= interval[1]:
return True
else:
- return False \ No newline at end of file
+ return False
+
+def get_cells_in_interval(origin, interval, cells):
+ return list(filter(lambda x: check_point_in_interval(origin, x.pos, interval), cells)) \ No newline at end of file