From 8c93eb0f2f6d2aadefbcabd7081827ed0fa31a0c Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Mon, 18 Dec 2017 00:07:26 -0700 Subject: [PATCH 1/2] README: fix a type error in Offseting Paths example Before this commit the `t = k / steps` math is done with integers, which always results in `t = 0`. This commit forces the math to be done with floating-point numbers, which results in the progression of `t` values we want. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 71867f5..db79c2c 100644 --- a/README.rst +++ b/README.rst @@ -587,7 +587,7 @@ curve `__ for a few paths. for seg in path: ct = 1 for k in range(steps): - t = k / steps + t = k / float(steps) offset_vector = offset_distance * seg.normal(t) nl = Line(seg.point(t), seg.point(t) + offset_vector) nls.append(nl) From 2a456b168d864523ccae09f39626b277110b0994 Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Mon, 18 Dec 2017 08:22:40 -0700 Subject: [PATCH 2/2] README: remove dead code from Offsetting Paths example --- README.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/README.rst b/README.rst index db79c2c..b0ad6b5 100644 --- a/README.rst +++ b/README.rst @@ -585,7 +585,6 @@ curve `__ for a few paths. of the 'parallel' offset curve.""" nls = [] for seg in path: - ct = 1 for k in range(steps): t = k / float(steps) offset_vector = offset_distance * seg.normal(t)