Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fixed negative decimal issue

Grant Sandersonfc7d67e25fd8
diff --git a/manimlib/mobject/numbers.py b/manimlib/mobject/numbers.py
index 6813c46b4..5f48ce2ed 100644
--- a/manimlib/mobject/numbers.py
+++ b/manimlib/mobject/numbers.py
@@ -105,9 +105,9 @@ class DecimalNumber(VMobject):
full_config.update(self.initial_config)
full_config.update(config)
new_decimal = DecimalNumber(number, **full_config)
- # new_decimal.match_height(self)
+ # Make sure last digit has constant height
new_decimal.scale(
- self[0].get_height() / new_decimal[0].get_height()
+ self[-1].get_height() / new_decimal[-1].get_height()
)
new_decimal.move_to(self, self.edge_to_fix)
new_decimal.match_style(self)