From 644399b574c7e1d2137ce466b06be00239b675e6 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens <21057728+passervr@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:57:31 +0100 Subject: [PATCH] updated template --- Matrix.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Matrix.cpp b/Matrix.cpp index dcc08f4..b6bf89c 100644 --- a/Matrix.cpp +++ b/Matrix.cpp @@ -59,18 +59,18 @@ Vector3 MatrixOf::Multiply(MatrixOf* m, Vector3 v) { return r; } -template -T MatrixOf::Get(unsigned int rowIx, unsigned int colIx) { +template <> +float MatrixOf::Get(unsigned int rowIx, unsigned int colIx) { unsigned int dataIx = rowIx * this->cols + colIx; return this->data[dataIx]; } -template -unsigned int MatrixOf::RowCount() { +template <> +unsigned int MatrixOf::RowCount() { return rows; } -template -unsigned int MatrixOf::ColCount() { +template <> +unsigned int MatrixOf::ColCount() { return cols; } \ No newline at end of file