mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Simplify Square
This commit is contained in:
parent
1c2b52a128
commit
b667db2d31
1 changed files with 2 additions and 10 deletions
|
@ -842,16 +842,8 @@ class Rectangle(Polygon):
|
||||||
|
|
||||||
|
|
||||||
class Square(Rectangle):
|
class Square(Rectangle):
|
||||||
CONFIG = {
|
def __init__(self, side_length=2.0, **kwargs):
|
||||||
"side_length": 2.0,
|
self.side_length = side_length
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(self, side_length=None, **kwargs):
|
|
||||||
digest_config(self, kwargs)
|
|
||||||
|
|
||||||
if side_length is None:
|
|
||||||
side_length = self.side_length
|
|
||||||
|
|
||||||
super().__init__(side_length, side_length, **kwargs)
|
super().__init__(side_length, side_length, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue