Merge pull request #2009 from Varniex/patch-1

Correction of indices
This commit is contained in:
Grant Sanderson 2024-09-06 10:59:04 -07:00 committed by GitHub
commit df9acfb4d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -225,7 +225,7 @@ def smooth_quadratic_path(anchors: Vect3Array) -> Vect3Array:
if len(anchors) < 2: if len(anchors) < 2:
return anchors return anchors
elif len(anchors) == 2: elif len(anchors) == 2:
return np.array([anchors[0], anchors.mean(1), anchors[2]]) return np.array([anchors[0], anchors.mean(0), anchors[1]])
is_flat = (anchors[:, 2] == 0).all() is_flat = (anchors[:, 2] == 0).all()
if not is_flat: if not is_flat: