Minor
This commit is contained in:
parent
0b91ec8024
commit
efb25578a1
@ -98,10 +98,9 @@ def cubic_approx_control(p, t):
|
|||||||
return p1+(p2-p1)*t
|
return p1+(p2-p1)*t
|
||||||
|
|
||||||
|
|
||||||
def calc_intersect(p):
|
def calc_intersect(a, b, c, d):
|
||||||
"""Calculate the intersection of ab and cd, given [a, b, c, d]."""
|
"""Calculate the intersection of ab and cd, given a, b, c, d."""
|
||||||
|
|
||||||
a, b, c, d = p
|
|
||||||
ab = b - a
|
ab = b - a
|
||||||
cd = d - c
|
cd = d - c
|
||||||
p = ab * 1j
|
p = ab * 1j
|
||||||
@ -154,7 +153,7 @@ def cubic_approx_spline(p, n, tolerance):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if n == 1:
|
if n == 1:
|
||||||
qp1 = calc_intersect(p)
|
qp1 = calc_intersect(*p)
|
||||||
if qp1 is None:
|
if qp1 is None:
|
||||||
return None
|
return None
|
||||||
p0 = p[0]
|
p0 = p[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user