diff options
-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 |