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.pull/34/head
parent
b54bf778b4
commit
8c93eb0f2f
|
@ -587,7 +587,7 @@ curve <https://en.wikipedia.org/wiki/Parallel_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)
|
||||
|
|
Loading…
Reference in New Issue