Numbers¶
DecimalNumber¶
-
class
manimlib.mobject.numbers.
DecimalNumber
(number: float | complex = 0, **kwargs)¶ 十进制(浮点)数
num_decimal_places
: 小数点位数unit
: 单位符号show_ellipsis
: 显示省略号group_with_commas
: 3 位一组,用逗号隔开
-
get_formatter
(**kwargs) → str¶ 配置基于第一个实例属性,但被任何关键字参数覆盖,相关参数如下(这句话看不懂,看下面的英文解释)
Configuration is based first off instance attributes, but overwritten by any key word argument. Relevant key words:
include_sign
group_with_commas
num_decimal_places
field_name (e.g. 0 or 0.real)
-
get_value
() → float | complex¶ 获取数值
-
increment_value
(delta_t: float | complex = 1) → None¶ 数值增加
-
set_value
(number: float | complex)¶ 设置数值