diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-25 15:45:12 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-25 15:45:12 +0100 |
commit | 985c00dbbc360f62be1f518b0b77771a019aaccf (patch) | |
tree | c32faeb9e65eb86a72f9c642035a31e1194eaed3 /src/vector.h | |
parent | 5307b022f652ad34a8b2ef35d674817b7da33759 (diff) | |
download | mana-985c00dbbc360f62be1f518b0b77771a019aaccf.tar.gz mana-985c00dbbc360f62be1f518b0b77771a019aaccf.tar.bz2 mana-985c00dbbc360f62be1f518b0b77771a019aaccf.tar.xz mana-985c00dbbc360f62be1f518b0b77771a019aaccf.zip |
Added assignment operator for Vector
Diffstat (limited to 'src/vector.h')
-rw-r--r-- | src/vector.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vector.h b/src/vector.h index d181f938..25f6c120 100644 --- a/src/vector.h +++ b/src/vector.h @@ -60,6 +60,14 @@ class Vector return x == 0.0f && y == 0.0f && z == 0.0f; } + Vector &operator=(const Vector &v) + { + x = v.x; + y = v.y; + z = v.z; + return *this; + } + /** * Scale vector operator. */ |