summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-25 15:45:12 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-25 15:45:12 +0100
commit985c00dbbc360f62be1f518b0b77771a019aaccf (patch)
treec32faeb9e65eb86a72f9c642035a31e1194eaed3
parent5307b022f652ad34a8b2ef35d674817b7da33759 (diff)
downloadmana-985c00dbbc360f62be1f518b0b77771a019aaccf.tar.gz
mana-985c00dbbc360f62be1f518b0b77771a019aaccf.tar.bz2
mana-985c00dbbc360f62be1f518b0b77771a019aaccf.tar.xz
mana-985c00dbbc360f62be1f518b0b77771a019aaccf.zip
Added assignment operator for Vector
-rw-r--r--src/vector.h8
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.
*/