The quaternion calculated are unit length unless the the input matrix is degenerate. Detect degenerate cases and remove the normalize_qt call.
The quaternion calculated are unit length unless the the input matrix is degenerate. Detect degenerate cases and remove the normalize_qt call.