There seem to be some problems when computing the adjoint of a 4X4 matrix. In GLMatrix.h about line 938 and line 947 should be
938: inline T cofactorm9() const { return cofactor_maker(m14,m3,m4, m15,m0,m6, m12,m2,m7); }
instead of: inline T cofactorm9() const { return cofactor_maker(m14,m13,m4, m15,m0,m6, m12,m2,m7); }
***m3 in place of m13
947: inline T cofactorm13() const { return cofactor_maker(m2,m7,m8, m3,m4,m10, m0,m6,m11); }
instead of: inline T cofactorm13() const { return cofactor_maker(m2,m7,m8, m3,m4,m10, m10,m6,m11); }
***m0 in place of the 2nd m10
as it was adjoint and inverse do not produce the right result
Hope that helps anyone using this code.
-- Dave
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
There seem to be some problems when computing the adjoint of a 4X4 matrix. In GLMatrix.h about line 938 and line 947 should be
938: inline T cofactorm9() const { return cofactor_maker(m14,m3,m4, m15,m0,m6, m12,m2,m7); }
instead of: inline T cofactorm9() const { return cofactor_maker(m14,m13,m4, m15,m0,m6, m12,m2,m7); }
***m3 in place of m13
947: inline T cofactorm13() const { return cofactor_maker(m2,m7,m8, m3,m4,m10, m0,m6,m11); }
instead of: inline T cofactorm13() const { return cofactor_maker(m2,m7,m8, m3,m4,m10, m10,m6,m11); }
***m0 in place of the 2nd m10
as it was adjoint and inverse do not produce the right result
Hope that helps anyone using this code.
-- Dave
PS. I'm using version 0.5.2