added clipping to work around floating point error in Arc._parameterize()

pull/55/head
Andy 2018-07-24 15:07:02 -07:00
parent b47345da91
commit ccc9ee6ae1
1 changed files with 2 additions and 2 deletions

View File

@ -1380,8 +1380,8 @@ class Arc(object):
det_uv = u1.real*u2.imag - u1.imag*u2.real
acosand = u1.real*u2.real + u1.imag*u2.imag
if acosand > 1 or acosand < -1:
acosand = round(acosand)
acosand = np.clip(acosand.real, -1, 1) + np.clip(acosand.imag, -1, 1)
if det_uv > 0:
self.delta = degrees(acos(acosand))
elif det_uv < 0: