The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/math: Add m_matrix_2x2_invert

+10
+10
src/xrt/auxiliary/math/m_matrix_2x2.h
··· 47 47 *result_out = result; 48 48 } 49 49 50 + static inline void 51 + math_matrix_2x2_invert(const struct xrt_matrix_2x2 *matrix, struct xrt_matrix_2x2 *invertedMatrix) 52 + { 53 + float determinant = matrix->v[0] * matrix->v[3] - matrix->v[1] * matrix->v[2]; 54 + invertedMatrix->v[0] = matrix->v[3] / determinant; 55 + invertedMatrix->v[1] = -matrix->v[1] / determinant; 56 + invertedMatrix->v[2] = -matrix->v[2] / determinant; 57 + invertedMatrix->v[3] = matrix->v[0] / determinant; 58 + } 59 + 50 60 #ifdef __cplusplus 51 61 } 52 62 #endif