Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Make z_buff_func only round to the hundredths place, so small variations in z-coordiante not intended for z indexing don't mess things up

Grant Sandersond81262e58a5b
diff --git a/camera/camera.py b/camera/camera.py
index 17b2d7445..334c1200a 100644
--- a/camera/camera.py
+++ b/camera/camera.py
@@ -140,7 +140,8 @@ class Camera(object):
self, mobjects,
include_submobjects = True,
excluded_mobjects = None,
- z_buff_func = lambda m : m.get_center()[2]
+ #Round z coordinate to nearest hundredth when comparring
+ z_buff_func = lambda m : np.round(m.get_center()[2], 2)
):
if include_submobjects:
mobjects = self.extract_mobject_family_members(