Skip to content

gh-84464: Update turtle.circle() drawing direction doc #128986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/library/turtle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,10 @@ Turtle motion
the turtle; *extent* -- an angle -- determines which part of the circle
is drawn. If *extent* is not given, draw the entire circle. If *extent*
is not a full circle, one endpoint of the arc is the current pen
position. Draw the arc in counterclockwise direction if *radius* is
positive, otherwise in clockwise direction. Finally the direction of the
turtle is changed by the amount of *extent*.
position. Draw the arc in counterclockwise direction if both *radius*
and *extent* are positive or both are negative; otherwise, draw in clockwise
direction. Finally the direction of the turtle is changed by the amount of
*extent*.
Comment on lines +752 to +755
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When radius and extent are positive, the arc is counterclockwise. When radius and extent are both negative, one traverses the standard counterclockwise arc backwards. I wonder if this could be communicated better here?


As the circle is approximated by an inscribed regular polygon, *steps*
determines the number of steps to use. If not given, it will be
Expand Down
Loading