Document unit conversion helpers#4758
Closed
bubaizhanshen wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview: What does this pull request change?
Closes #2512.
This adds a guide for the unit conversion helpers exposed through
manim.unit, coveringPixels,Degrees,Percent, andMunits. It also links the new page from the guides index and includesutils.unitin 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 --checkpython -m py_compile manim/utils/unit.pyruff check docs/source/guides/unit_conversion.rst docs/source/reference_index/utilities.rst docs/source/reference/manim.utils.unit.rstruff format --check docs/source/guides/unit_conversion.rst docs/source/reference_index/utilities.rst docs/source/reference/manim.utils.unit.rstNot run: full docs build.