From: Ian Jackson Date: Sat, 30 Dec 2017 20:34:21 +0000 (+0000) Subject: helixish: ensure s and t are >0 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=db59c229b019128b1c4d46bcc9ad61f06e7f2be9;p=moebius3.git helixish: ensure s and t are >0 Signed-off-by: Ian Jackson --- diff --git a/helixish.py b/helixish.py index b1eac1c..bf8083f 100644 --- a/helixish.py +++ b/helixish.py @@ -161,6 +161,7 @@ class HelixishCurve(): def railway_ST(C, start, end, railway_r): delta = atan2(*(end - C)[0:2]) - atan2(*(start - C)[0:2]) dbg('railway_ST C', C, 'start', start, 'end', end, 'delta', delta) + if delta < 0: delta += tau s = delta * railway_r dbg('railway_ST delta', delta, 'r', railway_r, 's', s) return s