Added inline to explicit template specialization functions

This commit is contained in:
2025-02-03 12:34:37 -05:00
parent c1a1f994ea
commit 519c953fcb
2 changed files with 4 additions and 4 deletions

View File

@@ -1 +1 @@
A Simple matrix math library focused on embedded development which avoids and heap memory allocation unless you explicitly ask for it.
This matrix math library is focused on embedded development and avoids any heap memory allocation unless you explicitly ask for it.

View File

@@ -203,11 +203,11 @@ Matrix<rows, columns>::Transpose(Matrix<columns, rows> &result) const
// explicitly define the determinant for a 2x2 matrix because it is definitely
// the fastest way to calculate a 2x2 matrix determinant
template <>
float Matrix<0, 0>::Det() const { return 1e+6; }
inline float Matrix<0, 0>::Det() const { return 1e+6; }
template <>
float Matrix<1, 1>::Det() const { return this->matrix[0]; }
inline float Matrix<1, 1>::Det() const { return this->matrix[0]; }
template <>
float Matrix<2, 2>::Det() const
inline float Matrix<2, 2>::Det() const
{
return this->matrix[0] * this->matrix[3] - this->matrix[1] * this->matrix[2];
}