Skip to content
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

Add docstring for Mobject.rotate and Rotating class #4147

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

irvanalhaq9
Copy link
Contributor

@irvanalhaq9 irvanalhaq9 commented Feb 3, 2025

Overview: What does this pull request change?

Adding detailed docstrings for the rotate method in Mobject class . Also add docstring for Rotating class, including 2D and 3D rotation examples.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@irvanalhaq9 irvanalhaq9 changed the title Add docstring for Mobject.rotate Add docstring for Mobject.rotate and Rotating class Feb 3, 2025
@irvanalhaq9
Copy link
Contributor Author

irvanalhaq9 commented Feb 3, 2025

Also add docstring for Rotating class, including 2D and 3D rotation examples.

@@ -1011,7 +1011,7 @@ def dot_position(mobject):
label.add_updater(dot_position)
self.add(dot, label)
self.play(Rotating(dot, about_point=ORIGIN, angle=TAU, run_time=TAU, rate_func=linear))
self.play(Rotating(dot, about_point=ORIGIN, radians=TAU, run_time=TAU, rate_func=linear))
Copy link
Contributor Author

@irvanalhaq9 irvanalhaq9 Feb 4, 2025

Choose a reason for hiding this comment

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

This fixes an incorrect parameter in the documentation example of add_updater. The Rotating class uses radians instead of angle as its parameter.

@@ -3143,7 +3203,7 @@ def override_animate(method) -> types.FunctionType:
.. seealso::
:attr:`Mobject.animate`
:attr:`~.Mobject.animate`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a tilde (~) so that the rendered documentation displays only animate instead of Mobject.animate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant