diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-05-23 22:09:43 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-05-23 22:09:43 +0200 |
commit | 9620ed1c2c0c40400b638743b19462dfdc6b0c55 (patch) | |
tree | c8f26b67de04757ff07b597b48949aee906f31dd /engine/vector.cpp | |
parent | f1e9c6d19ef8a2b95f2b77103e02371c89d05188 (diff) |
Added Vector2::operator+=.
Diffstat (limited to 'engine/vector.cpp')
-rw-r--r-- | engine/vector.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/vector.cpp b/engine/vector.cpp index 1d243dd..c23466e 100644 --- a/engine/vector.cpp +++ b/engine/vector.cpp @@ -20,6 +20,12 @@ Vector2& Vector2::operator=(const Vector2& v) { return *this; } +Vector2& Vector2::operator+=(const Vector2& v) { + x += v.x; + y += v.y; + return *this; +} + Vector3::Vector3() : Vector2() { z = 0; } |