summaryrefslogtreecommitdiffstats
path: root/src/Vector.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-09-03 17:45:52 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:31 +0100
commit145ba8e157f79db64203db9684af2e6ed33af075 (patch)
treeec524120eaf2dda746d662297483be51fe626367 /src/Vector.hpp
parent2017-08-29 (diff)
downloadAltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.gz
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.bz2
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.lz
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.xz
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.tar.zst
AltCraft-145ba8e157f79db64203db9684af2e6ed33af075.zip
Diffstat (limited to '')
-rw-r--r--src/Vector.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Vector.hpp b/src/Vector.hpp
index c89154f..6389bbb 100644
--- a/src/Vector.hpp
+++ b/src/Vector.hpp
@@ -14,6 +14,11 @@ struct Vector3 {
Vector3(const Vector3 &rhs) : x(rhs.x), y(rhs.y), z(rhs.z) {}
+ template<class U>
+ Vector3(const Vector3<U> &rhs) : x(rhs.x), y(rhs.y), z(rhs.z) {}
+
+ Vector3(Vector3 &&rhs) = default;
+
~Vector3() = default;
double GetLength() const { return std::sqrt(std::pow(x, 2) + std::pow(y, 2) + std::pow(z, 2)); }