Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

add missing newlines before sphinx code blocks

Benjamin Hacklae9b18549dfd
diff --git a/manim/mobject/geometry.py b/manim/mobject/geometry.py
index 1f6afee43..36e2f7a9d 100644
--- a/manim/mobject/geometry.py
+++ b/manim/mobject/geometry.py
@@ -946,6 +946,7 @@ class ArrowTip(VMobject):
Examples
--------
::
+
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 0, 0]), buff=0)
>>> arrow.tip.base.round(2) + 0. # add 0. to avoid negative 0 in output
array([1.65, 0. , 0. ])
@@ -960,6 +961,7 @@ class ArrowTip(VMobject):
Examples
--------
::
+
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 0, 0]), buff=0)
>>> arrow.tip.tip_point.round(2) + 0.
array([2., 0., 0.])
@@ -974,6 +976,7 @@ class ArrowTip(VMobject):
Examples
--------
::
+
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 2, 0]), buff=0)
>>> arrow.tip.vector.round(2) + 0.
array([0.25, 0.25, 0. ])
@@ -988,6 +991,7 @@ class ArrowTip(VMobject):
Examples
--------
::
+
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([1, 1, 0]), buff=0)
>>> round(arrow.tip.tip_angle, 5) == round(PI/4, 5)
True
@@ -1002,6 +1006,7 @@ class ArrowTip(VMobject):
Examples
--------
::
+
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([1, 2, 0]))
>>> round(arrow.tip.tip_length, 3)
0.35
diff --git a/manim/utils/color.py b/manim/utils/color.py
index 2dabb9c64..86c679150 100644
--- a/manim/utils/color.py
+++ b/manim/utils/color.py
@@ -97,25 +97,27 @@ from ..utils.space_ops import normalize
class Colors(Enum):
"""A list of pre-defined colors.
-
+
Examples
--------
The preferred way of using these colors is
-
+
.. code-block:: python
+
import manim.utils.color as C
C.WHITE # -> '#FFFFFF'
-
+
Note this way uses the name of the colors in UPPERCASE.
-
+
Alternatively, you can also import this Enum directly and use its members
directly, through the use of :code:`color.value`. Note this way uses the
name of the colors in lowercase.
-
+
.. code-block:: python
+
from manim.utils.color import Colors
Colors.white.value # -> '#FFFFFF'
-
+
"""
dark_blue = "#236B8E"