mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Added get_complex_formatter to Decimal
This commit is contained in:
parent
56d2dce133
commit
d2fa2b6ef2
1 changed files with 6 additions and 2 deletions
|
@ -83,7 +83,7 @@ class DecimalNumber(VMobject):
|
|||
"""
|
||||
config = dict(self.__dict__)
|
||||
config.update(kwargs)
|
||||
return reduce(op.add, [
|
||||
return "".join([
|
||||
"{",
|
||||
config.get("field_name", ""),
|
||||
":",
|
||||
|
@ -94,7 +94,11 @@ class DecimalNumber(VMobject):
|
|||
])
|
||||
|
||||
def get_complex_formatter(self, **kwargs):
|
||||
pass
|
||||
return "".join([
|
||||
self.get_formatter(field_name="0.real"),
|
||||
self.get_formatter(field_name="0.imag", include_sign=True),
|
||||
"i"
|
||||
])
|
||||
|
||||
def set_value(self, number, **config):
|
||||
full_config = dict(self.initial_config)
|
||||
|
|
Loading…
Add table
Reference in a new issue