반응형
Integer class
object > Container > Mobject > VMobject > DecimalNumber > Integer
manimlib.mobject.numbers.Integer(self, number=0, **kwargs)
Used when dealing with integer numbers without decimal point.
The parameters used during creation are the same as for the DecimalNumber class.
Parameters: number=0
The number to make into an object. It can be updated via the set_value() method.
**kwargs
- num_decimal_places=0: Number of decimal places.
The Integer class differs from the DecimalNumber class
in that this value defaults to 0.
- include_sign=False: Decide whether to add positive/negative sign
- group_with_commas=True: Whether a comma (,) is added every three digits
- digit_to_digit_buff=0.05: Margin between numeric characters
- show_ellipsis=False: Whether to display empty digits as dots in the whole digit
- unit=None: Unit character to end the number.
It is displayed aligned with the bottom of the number.
Using "^" together aligns to the top of the number
- include_background_rectangle=False: Decide whether to display the background rectangle
surrounding the displayed number.
Note that the square color is black.
- edge_to_fix=LEFT: Specifies on which side the number is fixed and displayed.
This parameter is reflected only when a numeric value is specified
through set_value.
- In addition, all **kwargs items used for VMobject are available
You can use the Integer class for numbers without decimal point.
If an Integer is created using a number with a decimal point, an integer value rounded off the decimal point is created.
For example, if you make an Integer with 36.6, it will output 37.
a = Integer(36.6)
self.add(a)
self.wait()
Next: [05-5] Graph
Go To: [99] Table of Contents
반응형
'Programming > Manim Lectures' 카테고리의 다른 글
[05-5-A] Graph from ParametricFunction/FunctionGraph (0) | 2020.06.07 |
---|---|
[05-5] Graph (0) | 2020.06.07 |
[05-4-A] DecimalNumber (0) | 2020.06.07 |
[05-4] Numbers: DecimalNumber/Integer (0) | 2020.06.07 |
[05-3-G]Arc series(2/2): Circle/Dot/CurvedDoubleArrow/... (0) | 2020.06.07 |