From fe68aaacee5d63bd66eb047c01ed52f30718b27d Mon Sep 17 00:00:00 2001 From: SpitfireX Date: Wed, 12 Aug 2015 16:38:15 +0200 Subject: Fixed interval checking to be inclusive of the start and end values --- interval_utils.py | 2 +- 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)) -- cgit v1.2.3