Skip to content

Add docstring for Mobject.rotate and Refactor Rotating and also add its docstring #4147

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 5 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?

  1. Adding detailed docstrings for Mobject.rotate().
  2. Refactor Rotating, and add detailed docstring, and adjust Rotating parameter in Example Gallery.
    Breaking change:
    • renames the radians parameter to angle to be consistent with the .rotate() and the Rotate class.
    • reorders the arguments in the Rotating to be consistent with the .rotate() and the Rotate class.
      Before: Rotating(mobject, axis, radians, ...)
      After : Rotating(mobject, angle, axis, ...)

Links to added or changed documentation pages

  1. rotate: https://manimce--4147.org.readthedocs.build/en/4147/reference/manim.mobject.mobject.Mobject.html#manim.mobject.mobject.Mobject.rotate
  2. Rotating: https://manimce--4147.org.readthedocs.build/en/4147/reference/manim.animation.rotation.Rotating.html#manim.animation.rotation.Rotating

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
@JasonGrace2282 JasonGrace2282 added the documentation Improvements or additions to documentation label Feb 9, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board Apr 5, 2025
@irvanalhaq9 irvanalhaq9 force-pushed the add-rotate-docs branch 2 times, most recently from b93569b to 7edb2c3 Compare April 20, 2025 17:46
@irvanalhaq9 irvanalhaq9 changed the title Add docstring for Mobject.rotate and Rotating class Add docstring for Mobject.rotate and Refactor Rotating and also add its docstring Apr 20, 2025
@chopan050 chopan050 added breaking changes This PR introduces breaking changes refactor Refactor or redesign of existing code labels Jun 20, 2025
Copy link
Contributor

@chopan050 chopan050 left a comment

Choose a reason for hiding this comment

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

Thanks! I like the changes in general.

Honestly, I'm not sure whether Rotating should even exist in the first place, as it's very similar to Rotate with a hardcoded rate_func=linear and run_time=5 (now run_time=2). However, that's a discussion for another day.

I do have one specific question:

about_point: np.ndarray | None = None,
about_edge: np.ndarray | None = None,
run_time: float = 5,
run_time: float = 2,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason behind this change?

Copy link
Contributor Author

@irvanalhaq9 irvanalhaq9 Jun 20, 2025

Choose a reason for hiding this comment

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

I changed it to 2 seconds because 5 seconds felt unnecessarily long. As far as I can tell, there wasn’t a specific reason for choosing 5 seconds. Most animation classes in Manim default to 1 or 2 seconds (like DrawBorderThenFill, Write, FocusOn, Wiggle, ApplyWave, LaggedStartMap), so 2 seconds feels more consistent.

I'm also fine with keeping it at 5 seconds if that’s the preferred default — just let me know.

@irvanalhaq9 irvanalhaq9 requested a review from chopan050 June 20, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes This PR introduces breaking changes documentation Improvements or additions to documentation refactor Refactor or redesign of existing code
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

3 participants