diff options
author | SpitfireX <timm.weber@me.com> | 2015-08-12 17:06:05 +0200 |
---|---|---|
committer | SpitfireX <timm.weber@me.com> | 2015-08-12 17:06:05 +0200 |
commit | c61c5b52ba496ee4cc684d43117111ec7d351c0b (patch) | |
tree | ff21efc6b8c8244654d180fe783fc69aa2df5620 /interval_utils.py | |
parent | fe68aaacee5d63bd66eb047c01ed52f30718b27d (diff) |
potentially buggy check_point_in_interval
Diffstat (limited to 'interval_utils.py')
-rw-r--r-- | interval_utils.py | 5 |
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 |