diff --git a/interfaces/Crafter.Math-Vector.cppm b/interfaces/Crafter.Math-Vector.cppm index 8a040d2..a3a1c9d 100755 --- a/interfaces/Crafter.Math-Vector.cppm +++ b/interfaces/Crafter.Math-Vector.cppm @@ -79,6 +79,61 @@ namespace Crafter { VectorBase() = default; }; + template + struct VectorBase { + T v[Len]; + }; + + template + struct VectorBase { + union { + T v[1]; + T x; + }; + }; + + template + struct VectorBase { + union { + T v[2]; + struct { + T x, y; + }; + }; + VectorBase(float x, float y): x(x), y(y) { + + } + VectorBase() = default; + }; + + template + struct VectorBase { + union { + T v[3]; + struct { + T x, y, z; + }; + }; + VectorBase(float x, float y, float z): x(x), y(y), z(z) { + + } + VectorBase() = default; + }; + + template + struct VectorBase { + union { + T v[4]; + struct { + T x, y, z, w; + }; + }; + VectorBase(float x, float y, float z, float w): x(x), y(y), z(z), w(w) { + + } + VectorBase() = default; + }; + export template class Vector : public VectorBase { public: