Skip to content

Commit

Permalink
Add function to API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Oct 19, 2024
1 parent 8d93016 commit 547f226
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Normalization
:template: function.rst

~norm_vector
~matrix_requires_renormalization
~norm_matrix
~norm_angle
~norm_axis_angle
Expand Down
8 changes: 7 additions & 1 deletion pytransform3d/rotations/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ def matrix_requires_renormalization(R, tolerance=1e-6):
R : array-like, shape (3, 3)
Rotation matrix that should be orthonormal.
tolerance : float, optional (default: 1e-16)
tolerance : float, optional (default: 1e-6)
Tolerance for check.
Returns
-------
required : bool
Indicates if renormalization is required.
See Also
--------
norm_matrix : Orthonormalize rotation matrix.
"""
R = np.asarray(R, dtype=float)
RRT = np.dot(R, R.T)
Expand Down Expand Up @@ -87,6 +91,8 @@ def norm_matrix(R):
See Also
--------
check_matrix : Checks orthonormality of a rotation matrix.
matrix_requires_renormalization
Checks if a rotation matrix needs renormalization.
"""
R = np.asarray(R)
c2 = R[:, 1]
Expand Down

0 comments on commit 547f226

Please sign in to comment.