MCPcopy Create free account
hub / github.com/assaultcube/AC / invert

Method invert

source/src/tools.cpp:698–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

696}
697
698bool glmatrixf::invert(const glmatrixf &m, float mindet)
699{
700 float a1 = m.v[0], b1 = m.v[4], c1 = m.v[8], d1 = m.v[12];
701 adjoint(m);
702 float det = a1*v[0] + b1*v[1] + c1*v[2] + d1*v[3]; // float det = m.determinant();
703 if(fabs(det) < mindet) return false;
704 float invdet = 1/det;
705 loopi(16) v[i] *= invdet;
706 return true;
707}
708
709// multithreading and ipc tools wrapper for the server
710// all embedded servers and all standalone servers except on linux use SDL

Callers 1

readmatricesFunction · 0.80

Calls 1

loopiFunction · 0.70

Tested by

no test coverage detected