There was an error while loading. Please reload this page.
Computes the quaternion corresponding to a 3×3 rotation matrix.
This function is located in the pymath module. See pymath for the quaternion and matrix representations.
pymath
q = pymath.quat_from_matrix(mat)
mat
0
q
{x, y, z, w}
+1
pymath.matrix_from_quat
local R = pymath.matrix_from_quat({0, 0, 0.70710678, 0.70710678}) local q = pymath.quat_from_matrix(R) -- q == {0, 0, 0.70710678, 0.70710678} (round-trip)
Minimum PYTHA Version: V27
pymath, pymath.matrix_from_quat, pymath.quat_from_rotation