A community-maintained Python framework for creating mathematical animations.
Small fix to DecimalNumber
Grant Sanderson2f6fc82ecb2b
diff --git a/manimlib/mobject/numbers.py b/manimlib/mobject/numbers.pyindex df6ad50c2..6bda2b95f 100644--- a/manimlib/mobject/numbers.py+++ b/manimlib/mobject/numbers.py@@ -26,8 +26,8 @@ class DecimalNumber(VMobject):formatter = self.get_formatter()num_string = formatter.format(number)- shows_zero = np.round(number, self.num_decimal_places) == 0- if num_string.startswith("-") and shows_zero:+ rounded_num = np.round(float(number), self.num_decimal_places)+ if num_string.startswith("-") and rounded_num == 0:if self.include_sign:num_string = "+" + num_string[1:]else: