aboutsummaryrefslogtreecommitdiffstats
path: root/include/YAGE/Math/matrix.hpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-05-26 23:43:10 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-05-26 23:43:10 +0100
commit4c16cca26bdae09525c04665b536da98beb4c76f (patch)
tree0a3ba29199ed13aaf34b8e624da08719793d1df4 /include/YAGE/Math/matrix.hpp
parent89c11e6679346e77ee32eb1343d3cf4e7d429a46 (diff)
downloadYAGE-4c16cca26bdae09525c04665b536da98beb4c76f.tar.gz
YAGE-4c16cca26bdae09525c04665b536da98beb4c76f.zip
Creating matrix
Diffstat (limited to 'include/YAGE/Math/matrix.hpp')
-rw-r--r--include/YAGE/Math/matrix.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/YAGE/Math/matrix.hpp b/include/YAGE/Math/matrix.hpp
new file mode 100644
index 00000000..b6807c09
--- /dev/null
+++ b/include/YAGE/Math/matrix.hpp
@@ -0,0 +1,32 @@
+#ifndef YAGE_MATH_MATRIX_HPP
+#define YAGE_MATH_MATRIX_HPP
+
+namespace yage
+{
+
+template<typename Type, int Cols, int Rows> class Matrix
+{
+private:
+ Type x[Cols][Rows];
+
+public:
+ Matrix()
+ {
+ for(int i=0; i<Cols; ++i)
+ {
+ for(int j=0; j<Rows; ++j)
+ {
+ x[i][j]=5;
+ }
+ }
+ }
+
+ Type get(int i, int j) const
+ {
+ return x[i][j];
+ }
+};
+
+} // yage
+
+#endif