The quaternion corresponding to the rotation resulting from (Clifford Algebra-induced) reflections about the two normalized vectors A and B is simply
q = ( A · B, A × B )
quat->x = (m[2][1] - m[1][2]) * s ;
quat->y = (m[0][2] - m[2][0]) * s ;
quat->z = (m[1][0] - m[0][1]) * s ;
q[3] = (m[k][j] - m[j][k]) * s ;
double q0, double q1, double q2, double q3,
double q0, double q1, double q2, double
q3)
MatToQuat(double m[4][4], QUAT
*quat)
MatToQuat(double m[4][4], Quat
*quat)
QuatToMatrix(QUAT * quat, double
m[4][4])
QuatToMatrix(Quat * quat, double
m[4][4])