From: Jiri Vlasak Date: Fri, 10 Mar 2023 09:14:20 +0000 (+0100) Subject: Update set max helper procedure X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/path-to-traj.git/commitdiff_plain/0198f27b375a079ec1ac156297580bba8c2e11c3 Update set max helper procedure --- diff --git a/path-to-traj.py b/path-to-traj.py index 53e18f2..c003df2 100755 --- a/path-to-traj.py +++ b/path-to-traj.py @@ -64,10 +64,12 @@ def check_limits(x, max_x): def set_max(x, max_x): - if x >= 0: + if x > 0: return max_x - else: + elif x < 0: return -max_x + else: + return 0 def lines_intersect(li1, li2):