diff options
author | SpitfireX <timm.weber@me.com> | 2015-08-12 16:38:15 +0200 |
---|---|---|
committer | SpitfireX <timm.weber@me.com> | 2015-08-12 16:38:15 +0200 |
commit | fe68aaacee5d63bd66eb047c01ed52f30718b27d (patch) | |
tree | 6ebc03389f25a5478f9211199f1a0bf5dc295fe0 | |
parent | e88225c6a6d7766231ecfaacfd44eb3903a9e914 (diff) |
Fixed interval checking to be inclusive of the start and end values
-rw-r--r-- | interval_utils.py | 2 | ||||
-rw-r--r-- | strategy.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/interval_utils.py b/interval_utils.py index 0d77f4f..977b583 100644 --- a/interval_utils.py +++ b/interval_utils.py @@ -55,7 +55,7 @@ def check_point_in_interval(origin, p, interval): ang = get_point_angle(origin, p) print(interval) print(canonicalize_angle_interval(interval)) - if ang > interval[0] and ang < interval[1]: + if ang >= interval[0] and ang <= interval[1]: return True else: return False
\ No newline at end of file diff --git a/strategy.py b/strategy.py index 11926ac..961a4e1 100644 --- a/strategy.py +++ b/strategy.py @@ -102,7 +102,7 @@ class Strategy: #test stuff pls ignore interval = [0, 0.5*math.pi] - point = (c.player.center[0]+10, c.player.center[1]+200) + point = (c.player.center[0], c.player.center[1]+200) gui.draw_arc(c.player.center, 200, interval, (0,0,0)) gui.draw_circle(point, 2, (0,0,0)) |