warp.quat_from_matrix#

warp.quat_from_matrix(
mat: Matrix[3, 3, Float],
) Quaternion[Float]#
  • Kernel

  • Differentiable

Construct a quaternion from a 3x3 matrix.

If the matrix is not a pure rotation, but for example includes scaling or skewing, the result is undefined.

warp.quat_from_matrix(
mat: Matrix[4, 4, Float],
) Quaternion[Float]
  • Kernel

  • Differentiable

Construct a quaternion from a 4x4 matrix.

If the top-left 3x3 block of the matrix is not a pure rotation, but for example includes scaling or skewing, the result is undefined.