updated template

This commit is contained in:
Pascal Serrarens 2024-02-14 10:57:31 +01:00
parent 59f8d9982f
commit 644399b574

View File

@ -59,18 +59,18 @@ Vector3 MatrixOf<float>::Multiply(MatrixOf<float>* m, Vector3 v) {
return r; return r;
} }
template <typename T> template <>
T MatrixOf<T>::Get(unsigned int rowIx, unsigned int colIx) { float MatrixOf<float>::Get(unsigned int rowIx, unsigned int colIx) {
unsigned int dataIx = rowIx * this->cols + colIx; unsigned int dataIx = rowIx * this->cols + colIx;
return this->data[dataIx]; return this->data[dataIx];
} }
template <typename T> template <>
unsigned int MatrixOf<T>::RowCount() { unsigned int MatrixOf<float>::RowCount() {
return rows; return rows;
} }
template <typename T> template <>
unsigned int MatrixOf<T>::ColCount() { unsigned int MatrixOf<float>::ColCount() {
return cols; return cols;
} }