public void evalEulerEqnDeriv( ref btVector3 w1, ref btVector3 w0, double dt, ref btMatrix3x3 I, out btMatrix3x3 result ) { btMatrix3x3 w1x, Iw1x; btMatrix3x3 tmpm; btMatrix3x3 tmp2; btVector3 Iwi; I.Apply( ref w1, out Iwi ); w1.getSkewSymmetricMatrix( out w1x.m_el0, out w1x.m_el1, out w1x.m_el2 ); #if !DISABLE_ROW4 w1x.m_el3 = btVector3.wAxis; #endif Iwi.getSkewSymmetricMatrix( out Iw1x.m_el0, out Iw1x.m_el1, out Iw1x.m_el2 ); #if !DISABLE_ROW4 Iw1x.m_el3 = btVector3.wAxis; #endif I.Mult( ref w1x, out tmpm ); tmpm.Sub( ref Iw1x, out tmp2 ); tmp2.Mult( dt, out result ); //btMatrix3x3 dfw1 = I + ( w1x * I - Iw1x ) * dt; //return dfw1; }