MCPcopy Index your code
hub / github.com/HandmadeMath/HandmadeMath / HMM_InvGeneralM2

Function HMM_InvGeneralM2

HandmadeMath.h:1245–1257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1243
1244COVERAGE(HMM_InvGeneralM2, 1)
1245static inline HMM_Mat2 HMM_InvGeneralM2(HMM_Mat2 Matrix)
1246{
1247 ASSERT_COVERED(HMM_InvGeneralM2);
1248
1249 HMM_Mat2 Result;
1250 float InvDeterminant = 1.0f / HMM_DeterminantM2(Matrix);
1251 Result.Elements[0][0] = InvDeterminant * +Matrix.Elements[1][1];
1252 Result.Elements[1][1] = InvDeterminant * +Matrix.Elements[0][0];
1253 Result.Elements[0][1] = InvDeterminant * -Matrix.Elements[0][1];
1254 Result.Elements[1][0] = InvDeterminant * -Matrix.Elements[1][0];
1255
1256 return Result;
1257}
1258
1259/*
1260 * 3x3 Matrices

Callers 2

HMM_InvGeneralFunction · 0.85
TESTFunction · 0.85

Calls 1

HMM_DeterminantM2Function · 0.85

Tested by

no test coverage detected