diff --git a/glm/detail/type_quat.hpp b/glm/detail/type_quat.hpp index ae70e091..32d2839a 100644 --- a/glm/detail/type_quat.hpp +++ b/glm/detail/type_quat.hpp @@ -42,7 +42,7 @@ namespace glm # if GLM_LANG & GLM_LANG_CXXMS_FLAG union { - struct { T w, x, y, z;}; + struct { T x, y, z, w;}; typename detail::storage<4, T, detail::is_aligned::value>::type data; }; diff --git a/glm/detail/type_quat.inl b/glm/detail/type_quat.inl index 6aba9218..9d8344b6 100644 --- a/glm/detail/type_quat.inl +++ b/glm/detail/type_quat.inl @@ -103,19 +103,19 @@ namespace detail template template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(qua const& q) - : w(q.w), x(q.x), y(q.y), z(q.z) + : x(q.x), y(q.y), z(q.z), w(q.w) {} // -- Explicit basic constructors -- template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(T s, vec<3, T, Q> const& v) - : w(s), x(v.x), y(v.y), z(v.z) + : x(v.x), y(v.y), z(v.z), w(s) {} template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(T _w, T _x, T _y, T _z) - : w(_w), x(_x), y(_y), z(_z) + : x(_x), y(_y), z(_z), w(_w) {} // -- Conversion constructors -- @@ -123,10 +123,10 @@ namespace detail template template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(qua const& q) - : w(static_cast(q.w)) - , x(static_cast(q.x)) + : x(static_cast(q.x)) , y(static_cast(q.y)) , z(static_cast(q.z)) + , w(static_cast(q.w)) {} //template