Skip to content

Commit bec7a78

Browse files
authored
Merge pull request #2 from akmonengine/fix/stability
fix(polytope): add point to centroid
2 parents 1354d96 + c287d40 commit bec7a78

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

epa/polytope.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ func (b *PolytopeBuilder) calculateCentroid() mgl64.Vec3 {
212212
b.uniquePoints = append(b.uniquePoints, mgl64.Vec3{}) // Add space
213213
copy(b.uniquePoints[insertIdx+1:], b.uniquePoints[insertIdx:])
214214
b.uniquePoints[insertIdx] = point
215+
} else {
216+
b.uniquePoints = append(b.uniquePoints, point)
215217
}
216218
}
217219
}

0 commit comments

Comments
 (0)