updated template
This commit is contained in:
parent
59f8d9982f
commit
644399b574
12
Matrix.cpp
12
Matrix.cpp
@ -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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user