diff options
author | Nao Pross <naopross@thearcway.org> | 2019-06-24 10:16:32 +0200 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2019-06-24 10:17:45 +0200 |
commit | 4234e4adf62d035cd4c7bb5e9412fabc013dba6e (patch) | |
tree | 42aa3eb306719436bb5c39c0ec55fedd35fbdaa6 /include | |
parent | Update matrix test, add square matrix trace and fix comments (diff) | |
parent | Update CMakeLists and structure under include (diff) | |
download | libmm-4234e4adf62d035cd4c7bb5e9412fabc013dba6e.tar.gz libmm-4234e4adf62d035cd4c7bb5e9412fabc013dba6e.zip |
Merge branch 'master' into matrices
Diffstat (limited to 'include')
-rw-r--r-- | include/mm/mm.hpp (renamed from include/mm) | 0 | ||||
-rw-r--r-- | include/mm/mmmatrix.hpp (renamed from include/mmmatrix.hpp) | 0 | ||||
-rw-r--r-- | include/mm/mmvec.hpp (renamed from include/mmvec.hpp) | 17 |
3 files changed, 3 insertions, 14 deletions
diff --git a/include/mm b/include/mm/mm.hpp index 7e9f02b..7e9f02b 100644 --- a/include/mm +++ b/include/mm/mm.hpp diff --git a/include/mmmatrix.hpp b/include/mm/mmmatrix.hpp index 5285429..5285429 100644 --- a/include/mmmatrix.hpp +++ b/include/mm/mmmatrix.hpp diff --git a/include/mmvec.hpp b/include/mm/mmvec.hpp index 21e91b5..1939388 100644 --- a/include/mmvec.hpp +++ b/include/mm/mmvec.hpp @@ -222,10 +222,7 @@ std::ostream& operator<<(std::ostream& os, const mm::basic_vec<T, d>& v) { template<typename T, std::size_t d> class mm::vec: public mm::basic_vec<T, d> { public: - vec(std::initializer_list<T> l) : basic_vec<T, d>(l) {} - - template<std::size_t n> - vec(const basic_vec<T, n>& other) : basic_vec<T, d>(other) {} + using mm::basic_vec<T, d>::basic_vec; }; @@ -235,11 +232,7 @@ public: template<typename T> class mm::vec3 : public mm::basic_vec<T, 3> { public: - vec3() : basic_vec<T, 3>() {} - vec3(std::initializer_list<T> l) : basic_vec<T, 3>(l) {} - - template<std::size_t n> - vec3(const basic_vec<T, n>& other) : basic_vec<T, 3>(other) {} + using mm::basic_vec<T, 3>::basic_vec; T& x() { return this->at(0); } T& y() { return this->at(1); } @@ -293,11 +286,7 @@ mm::vec3<T> mm::vec3<T>::cross(const vec3<T>& rhs, const vec3<T>& lhs) { template<typename T> class mm::vec2: public mm::basic_vec<T, 2> { public: - vec2() : basic_vec<T, 2>() {} - vec2(std::initializer_list<T> l) : basic_vec<T, 2>(l) {} - - template<std::size_t n> - vec2(const basic_vec<T, n>& other) : basic_vec<T, 2>(other) {} + using mm::basic_vec<T, 2>::basic_vec; T& x() { return this->at(0); } T& y() { return this->at(1); } |