Performance improvements to 3d constructs

This commit is contained in:
Grant Sanderson
2018-08-16 22:25:51 -07:00
parent daffec0034
commit 6f57a8bc5e
6 changed files with 50 additions and 33 deletions

View File

@ -707,9 +707,9 @@ class Mobject(Container):
all_points = self.get_all_points()
for dim in range(self.dim):
if direction[dim] <= 0:
min_val = np.min(all_points[:, dim])
min_val = min(all_points[:, dim])
if direction[dim] >= 0:
max_val = np.max(all_points[:, dim])
max_val = max(all_points[:, dim])
if direction[dim] == 0:
result[dim] = (max_val + min_val) / 2