diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-22 17:47:51 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-22 17:47:51 +0100 |
commit | 7f27d3bf881ca3c257ab346c4ef5b6b0d177cdaa (patch) | |
tree | b14b5680dd12b59430d6de6f0250c809a0ef6df9 /test | |
parent | 4e8c07d3fd949287fc2361284a5a7704e642396e (diff) | |
download | YAGE-7f27d3bf881ca3c257ab346c4ef5b6b0d177cdaa.tar.gz YAGE-7f27d3bf881ca3c257ab346c4ef5b6b0d177cdaa.zip |
Documenting
Diffstat (limited to 'test')
-rw-r--r-- | test/matrix_test.cpp | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/test/matrix_test.cpp b/test/matrix_test.cpp index aa8bb71d..16548164 100644 --- a/test/matrix_test.cpp +++ b/test/matrix_test.cpp @@ -1,35 +1,14 @@ -#include "Math/math.hpp" +/* + * created 22-06-17 by Yann Herklotz + * + * Tests the math class using different tests to see if matrix operations work + * correctly. + * + */ -#include <iostream> +#include "Math/math.hpp" int main() { - yage::Matrix<4, 4, int> m1, m2; - - yage::Vector<2, int> v1, v2; - - yage::Vector2d v3; - - m1[0][1]=1; - m2[1][1]=2; - - v1[0]=2; - v1[1]=3; - v2[0]=5; - v2[1]=2; - - v2 += v1+v1; - - v3.x() = 2; - v3.y() = 1; - - auto m3=yage::matrix::transpose(v3); - auto vec4=yage::Vector<2, double>(yage::matrix::transpose(m3)); - - std::cout<<m2<<'\n'; - std::cout<<v3<<'\n'; - std::cout<<m3<<'\n'; - std::cout<<vec4<<'\n'; - return 0; } |