v3d.math.is_rot#

visu3d.math.is_rot(rot: etils.enp.array_types.typing.FloatArray, *, atol: float = 1e-06) bool[source]#

Checks if a matrix is a valid rotation matrix SO(3).

This is done by checking:

  • R.T @ R = Identity (R is orthogonal)

  • det(R) = +1 (-1 corresponding to reflexions)

If you don’t care about reflexions, use is_orth instead.

See: https://en.wikipedia.org/wiki/3D_rotation_group#Orthogonal_and_rotation_matrices

Parameters:
  • rot – The 3x3 matrix to check

  • atol – Precision at which checking the matrix

Returns:

True if the matrix is a rotation matrix.