I have 4x4 transformation matrices that represents translation, scale and rotation of a given object in 3d space.
I found how to extract translation, scale and rotation assuming the scale is always positive, but in my case those matrices can contain negative values for the scale vector (the rotation/scale 3x3 matrix determinant can be negative).
Assuming those matrices with negative determinant, how can I decompose the correct values for scale and rotation?