mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Small fix to DecimalNumber
This commit is contained in:
parent
8e0fae4663
commit
2f6fc82ecb
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue