mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 06:47:51 +00:00
Tiny refactor
This commit is contained in:
parent
cece830349
commit
ad58a9e6c1
1 changed files with 2 additions and 1 deletions
|
|
@ -116,13 +116,14 @@ class DecimalNumber(VMobject):
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
config.update(kwargs)
|
config.update(kwargs)
|
||||||
|
ndp = config["num_decimal_places"]
|
||||||
return "".join([
|
return "".join([
|
||||||
"{",
|
"{",
|
||||||
config.get("field_name", ""),
|
config.get("field_name", ""),
|
||||||
":",
|
":",
|
||||||
"+" if config["include_sign"] else "",
|
"+" if config["include_sign"] else "",
|
||||||
"," if config["group_with_commas"] else "",
|
"," if config["group_with_commas"] else "",
|
||||||
".", str(config["num_decimal_places"]), "f",
|
f".{ndp}f",
|
||||||
"}",
|
"}",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue