Tiny refactor

This commit is contained in:
Grant Sanderson 2022-05-23 11:07:39 -07:00
parent cece830349
commit ad58a9e6c1

View file

@ -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",
"}", "}",
]) ])