summary refs log tree commit diff
path: root/src/Math/Vector.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-10 04:42:49 +0200
committerMel <einebeere@gmail.com>2023-07-10 04:42:49 +0200
commit354a49d852d8f9ed9b66d7780ba43ce3a9ec59d7 (patch)
tree5f311f6aa47db9a231164a82403cc0e1e53864e8 /src/Math/Vector.hpp
parent22aeb320b193705f493747714404c8ddc752919b (diff)
downloadmeowcraft-354a49d852d8f9ed9b66d7780ba43ce3a9ec59d7.tar.zst
meowcraft-354a49d852d8f9ed9b66d7780ba43ce3a9ec59d7.zip
Separate transparent water mesh (not sorted, bad)
Diffstat (limited to 'src/Math/Vector.hpp')
-rw-r--r--src/Math/Vector.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Math/Vector.hpp b/src/Math/Vector.hpp
index 3d5a5be..3d9cb0e 100644
--- a/src/Math/Vector.hpp
+++ b/src/Math/Vector.hpp
@@ -29,6 +29,13 @@ struct Vector {
         std::copy(vector.elements, vector.elements + S, elements);
     }
 
+    template<typename T2>
+    explicit Vector(const Vector<S, T2> vector) {
+        for (Int i = 0; i < S; i++) {
+            elements[i] = (T)vector[i];
+        }
+    }
+
     template<typename F>
     Vector map(F f) const {
         Vector result{};