// // Math.cpp // amoeba // // Created by Timothy Prepscius on 12/30/16. // Copyright © 2016 Timothy Prepscius. All rights reserved. // #include "HMatrix.hpp" #include "HMatrix.inl" namespace tjp { namespace core { namespace math { // inline template<> HMatrix operator *(const HMatrix &lhs, const HMatrix &rhs) { HMatrix result; for (int r = 0; r < 4; ++r) { for (int c = 0; c < 4; ++c) { result[r][c] = 0; for (int i = 0; i < 4; ++i) { result[r][c] += lhs[i][c] * rhs[r][i]; } } } return result; } template<> const HMatrix HMatrix::Zero { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; template<> const HMatrix HMatrix::Identity { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; } // namespace } // namespace } // namespace