As noted in https://bugzilla.mozilla.org/show_bug.cgi?id=531344, the matrix needs to be checked for singularity. I think that checking for Math.abs(a*d-b*c)<0.01 as a functional approximation is too rigid - i'm working with a project where the window to be transformed is very long and thin, and the affineTransformDecompose function regularly throws "fail!" at me. No worries if you want to keep it rigid - thought you should know.
As noted in https://bugzilla.mozilla.org/show_bug.cgi?id=531344, the matrix needs to be checked for singularity. I think that checking for
Math.abs(a*d-b*c)<0.01
as a functional approximation is too rigid - i'm working with a project where the window to be transformed is very long and thin, and theaffineTransformDecompose function
regularly throws"fail!"
at me. No worries if you want to keep it rigid - thought you should know.