diff options
Diffstat (limited to 'src/Math/Vector.hpp')
| -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{}; |
