Multiply 2 matrices
| 30 | |
| 31 | // Multiply 2 matrices |
| 32 | void matrixMultiply(Matrix& result, const Matrix& left, const Matrix& right) |
| 33 | { |
| 34 | Matrix temp; |
| 35 | |
| 36 | for (std::size_t i = 0; i < temp.size(); ++i) |
| 37 | { |
| 38 | for (std::size_t j = 0; j < temp[0].size(); ++j) |
| 39 | temp[i][j] = left[0][j] * right[i][0] + left[1][j] * right[i][1] + left[2][j] * right[i][2] + |
| 40 | left[3][j] * right[i][3]; |
| 41 | } |
| 42 | |
| 43 | result = temp; |
| 44 | } |
| 45 | |
| 46 | // Rotate a matrix around the x-axis |
| 47 | void matrixRotateX(Matrix& result, sf::Angle angle) |
no outgoing calls
no test coverage detected