Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

+ for 0 in Decimal number

Grant Sanderson7736e321a065
diff --git a/mobject/numbers.py b/mobject/numbers.py
index 56bc4faeb..1b90d352c 100644
--- a/mobject/numbers.py
+++ b/mobject/numbers.py
@@ -29,7 +29,10 @@ class DecimalNumber(VMobject):
shows_zero = np.round(number, self.num_decimal_places) == 0
if num_string.startswith("-") and shows_zero:
- num_string = num_string[1:]
+ if self.include_sign:
+ num_string = "+" + num_string[1:]
+ else:
+ num_string = num_string[1:]
self.add(*[
SingleStringTexMobject(char, **kwargs)