Added vector2.

This commit is contained in:
jgoppert
2015-11-07 14:27:12 -05:00
parent ace2751715
commit 9b995e19f3
12 changed files with 160 additions and 45 deletions
+14
View File
@@ -94,6 +94,20 @@ public:
return res;
}
Matrix<Type, M, N> emult(const Matrix<Type, M, N> &other) const
{
Matrix<Type, M, N> res;
const Matrix<Type, M, N> &self = *this;
for (size_t i = 0; i < M; i++) {
for (size_t j = 0; j < N; j++) {
res(i , j) = self(i, j)*other(i, j);
}
}
return res;
}
Matrix<Type, M, N> operator+(const Matrix<Type, M, N> &other) const
{
Matrix<Type, M, N> res;