Skip to content

Document unit conversion helpers#4758

Closed
bubaizhanshen wants to merge 1 commit into
ManimCommunity:mainfrom
bubaizhanshen:document-unit-conversions
Closed

Document unit conversion helpers#4758
bubaizhanshen wants to merge 1 commit into
ManimCommunity:mainfrom
bubaizhanshen:document-unit-conversions

Conversation

@bubaizhanshen
Copy link
Copy Markdown

@bubaizhanshen bubaizhanshen commented Jun 1, 2026

Overview: What does this pull request change?

Closes #2512.

This adds a guide for the unit conversion helpers exposed through manim.unit, covering Pixels, Degrees, Percent, and Munits. It also links the new page from the guides index and includes utils.unit in the utilities reference index.

Motivation and Explanation: Why and how do your changes improve the library?

The unit conversion helpers were available but not documented outside of the source. The new guide explains what each helper converts to and notes that pixel and percentage conversions depend on the current frame configuration.

Links to added or changed documentation pages

The documentation preview should be available from the Read the Docs check for this PR.

Further Information and Comments

Local checks:

  • git diff --check
  • python -m py_compile manim/utils/unit.py
  • ruff check docs/source/guides/unit_conversion.rst docs/source/reference_index/utilities.rst docs/source/reference/manim.utils.unit.rst
  • ruff format --check docs/source/guides/unit_conversion.rst docs/source/reference_index/utilities.rst docs/source/reference/manim.utils.unit.rst

Not run: full docs build.

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.

Add documentation about unit conversion feature

1 participant