diff --git a/include/Orange/Math/Swizzle.h b/include/Orange/Math/Swizzle.h index 70e3ac7..ec5cb38 100644 --- a/include/Orange/Math/Swizzle.h +++ b/include/Orange/Math/Swizzle.h @@ -88,12 +88,8 @@ namespace orange copy(&components[0], &components[2], data.begin()); } - template - constexpr Swizzle(const Args&... args) - : data {{ args... }} - { - static_assert(sizeof...(Args) == 2); - } + constexpr Swizzle(T x, T y) + : data {{ x, y }} {} constexpr Swizzle(const Swizzle& other) = default; }; @@ -131,12 +127,8 @@ namespace orange copy(&components[0], &components[3], data.begin()); } - template - constexpr Swizzle(const Args&... args) - : data {{ args... }} - { - static_assert(sizeof...(Args) == 3); - } + constexpr Swizzle(T x, T y, T z) + : data {{ x, y, z }} {} constexpr Swizzle(const Swizzle& other) = default; }; @@ -176,12 +168,8 @@ namespace orange copy(&components[0], &components[4], data.begin()); } - template - constexpr Swizzle(const Args&... args) - : data {{ args... }} - { - static_assert(sizeof...(Args) == 4); - } + constexpr Swizzle(T x, T y, T z, T w) + : data {{ x, y, z, w }} {} constexpr Swizzle(const Swizzle& other) = default; };