updated template

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

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