Matrix functions
Header: <glm/matrix.hpp>
(included by <glm/glm.hpp>
)
determinant(mat<2, 2, T, Q> m) -> T
determinant(mat<3, 3, T, Q> m) -> T
determinant(mat<4, 4, T, Q> m) -> T
inverse(mat<2, 2, T, Q> m) -> mat<2, 2, T, Q>
inverse(mat<3, 3, T, Q> m) -> mat<3, 3, T, Q>
inverse(mat<4, 4, T, Q> m) -> mat<4, 4, T, Q>
matrixCompMult(mat<C, R, T, Q> x, mat<C, R, T, Q> y) -> mat<C, R, T, Q>
- Multiply matrix \(x\) by matrix \(y\) component-wise.
outerProduct(vec<C, T, Q> c, vec<R, T, Q> r) -> mat<R, C, T, Q>
- \(2\le C\le 4\), \(2\le R\le 4\).
- Let \(c=(a_1,\ldots,a_n)\), \(r=(b_1,\ldots,b_m)\).
- Returns \({c}^Tr =\begin{pmatrix}a_1\\\vdots\\a_n\end{pmatrix}\begin{pmatrix}b_1&\cdots&b_m\end{pmatrix} =(a_ib_j)_{ij}=\begin{pmatrix} a_1b_1 & \cdots & a_1b_m \\ \vdots & & \vdots \\ a_nb_1 & \cdots & a_nb_m \end{pmatrix}\)
transpose(mat<C, R, T, Q> m) -> mat<R, C, T, Q>
- \(2\le C\le 4\), \(2\le R\le 4\).