Archived post by lcrs

to find the “difference” between your two matrices you can invert the first then multiply by the second – think of it like “remove the transform of matrix1 from matrix2, leaving just the difference between them”. that gives you a matrix, which you can turn into a quaternion, which you can turn into an angle/axis rotation like @w “`matrix3 m1 = ident(); matrix3 m2 = ident(); rotate(m2, 0.5, {1, 0, 0});
matrix3 diff = invert(m1) * m2; vector4 quat = quaternion(diff); v@w = qconvert(quat);“`