diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-05-19 20:08:23 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-05-19 20:08:23 +0100 |
commit | 3308d13ad04fac43e7a111b299ff9444aea4ab9f (patch) | |
tree | 54a91113f75e506318101acf3151d3b11d309e96 /src/vector2d.cpp | |
parent | e15b2c6dd405d008d9e892608c209fd980bcd8ff (diff) | |
download | YAGE-3308d13ad04fac43e7a111b299ff9444aea4ab9f.tar.gz YAGE-3308d13ad04fac43e7a111b299ff9444aea4ab9f.zip |
Adding math to yage
Diffstat (limited to 'src/vector2d.cpp')
-rw-r--r-- | src/vector2d.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vector2d.cpp b/src/vector2d.cpp new file mode 100644 index 00000000..88e637c6 --- /dev/null +++ b/src/vector2d.cpp @@ -0,0 +1,20 @@ +#include "Math/vector2d.hpp" + +namespace yage +{ + +Vector2D::Vector2D(long double x, long double y) : + Vector({ x, y }) +{} + +long double Vector2D::getX() const +{ + return (*this)[0]; +} + +long double Vector2D::getY() const +{ + return (*this)[1]; +} + +} // yage |