diff --git a/include/blt/math/vectors.h b/include/blt/math/vectors.h index 53fd33a..528ae32 100644 --- a/include/blt/math/vectors.h +++ b/include/blt/math/vectors.h @@ -25,7 +25,7 @@ namespace blt { template struct vec { - protected: + private: T elements[size]{}; public: @@ -39,14 +39,18 @@ namespace blt { elements[i] = *(args.begin() + i); } - explicit vec(const T elem[], uint32_t v_size) { - for (uint32_t i = 0; i < v_size; i++) + explicit vec(const T elem[size]) { + for (uint32_t i = 0; i < size; i++) elements[i] = elem[i]; } - vec(const vec& copy): vec(copy.elements, size) {} + vec(const vec& copy): vec(copy.elements) {} + template - vec(const vec& copy): vec(copy.elements, size) {} + explicit vec(const vec& copy) { + for (uint32_t i = 0; i < o_size; i++) + elements[i] = copy[i]; + } vec& operator=(const vec& copy) { if (© == this)