For saving the bandwidth of video memory, my project decided to use a quaternion to store a TBN.
Now I get a tangent, bi-tangent and a normal vectors. for converting them to a quaternion, I use a 3x3 matrix that the Rows i, j, k of the matrix stored t, b, n. for sure I have already been to normalized the t,b,n and did the Schimdt orthonormal.
Then, I transformed the matrix to a quaternion. In order to test the quaternion, I transformed the quaternion back to matrix. unfortunately, the values of these vectors were all wrong.
I doubted the 3x3 Matrix which I built was not correct, or something else. I'm not sure.