diff options
| author | Mel <einebeere@gmail.com> | 2023-07-10 04:42:49 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-10 04:42:49 +0200 |
| commit | 354a49d852d8f9ed9b66d7780ba43ce3a9ec59d7 (patch) | |
| tree | 5f311f6aa47db9a231164a82403cc0e1e53864e8 /src/Math | |
| parent | 22aeb320b193705f493747714404c8ddc752919b (diff) | |
| download | meowcraft-354a49d852d8f9ed9b66d7780ba43ce3a9ec59d7.tar.zst meowcraft-354a49d852d8f9ed9b66d7780ba43ce3a9ec59d7.zip | |
Separate transparent water mesh (not sorted, bad)
Diffstat (limited to 'src/Math')
| -rw-r--r-- | src/Math/Vector.hpp | 7 |
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{}; |
