mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Fix bug with polygon start angle = 0
This commit is contained in:
parent
e6abff4299
commit
1367e31439
1 changed files with 2 additions and 1 deletions
|
@ -981,7 +981,8 @@ class RegularPolygon(Polygon):
|
|||
**kwargs
|
||||
):
|
||||
# Defaults to 0 for odd, 90 for even
|
||||
start_angle = start_angle or (n % 2) * 90 * DEGREES
|
||||
if start_angle is None:
|
||||
start_angle = (n % 2) * 90 * DEGREES
|
||||
start_vect = rotate_vector(radius * RIGHT, start_angle)
|
||||
vertices = compass_directions(n, start_vect)
|
||||
super().__init__(*vertices, **kwargs)
|
||||
|
|
Loading…
Add table
Reference in a new issue