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):
|
||||
CONFIG = {
|
||||
"side_length": 2.0,
|
||||
}
|
||||
|
||||
def __init__(self, side_length=None, **kwargs):
|
||||
digest_config(self, kwargs)
|
||||
|
||||
if side_length is None:
|
||||
side_length = self.side_length
|
||||
|
||||
def __init__(self, side_length=2.0, **kwargs):
|
||||
self.side_length = side_length
|
||||
super().__init__(side_length, side_length, **kwargs)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue