invertRotation method
Implementation
double invertRotation() {
final det = determinant();
if (det == 0.0) {
return 0.0;
}
final invDet = 1.0 / det;
double ix;
double iy;
double iz;
double jx;
double jy;
double jz;
double kx;
double ky;
double kz;
ix = invDet *
(_m4storage[5] * _m4storage[10] - _m4storage[6] * _m4storage[9]);
iy = invDet *
(_m4storage[2] * _m4storage[9] - _m4storage[1] * _m4storage[10]);
iz = invDet *
(_m4storage[1] * _m4storage[6] - _m4storage[2] * _m4storage[5]);
jx = invDet *
(_m4storage[6] * _m4storage[8] - _m4storage[4] * _m4storage[10]);
jy = invDet *
(_m4storage[0] * _m4storage[10] - _m4storage[2] * _m4storage[8]);
jz = invDet *
(_m4storage[2] * _m4storage[4] - _m4storage[0] * _m4storage[6]);
kx = invDet *
(_m4storage[4] * _m4storage[9] - _m4storage[5] * _m4storage[8]);
ky = invDet *
(_m4storage[1] * _m4storage[8] - _m4storage[0] * _m4storage[9]);
kz = invDet *
(_m4storage[0] * _m4storage[5] - _m4storage[1] * _m4storage[4]);
_m4storage[0] = ix;
_m4storage[1] = iy;
_m4storage[2] = iz;
_m4storage[4] = jx;
_m4storage[5] = jy;
_m4storage[6] = jz;
_m4storage[8] = kx;
_m4storage[9] = ky;
_m4storage[10] = kz;
return det;
}