This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The unmatrix code needs a cleanup. Some variables are not initialized or even defined. Some variable names change suddenly, like matrix to mat. It should be mentioned which coding language is used. The meaning of matrix[2][3] differ between languages (different order for rows and columns).
I used the 3D pseudo code from FX Transforms. All 3x2 matrices must be transformed to 4x4 matrices before decomposing. I don't think that we want to provide code for both cases, 2d and 3d.
The 3D code is a lot cleaner.