diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index b3cd75bd..eb354080 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -24,11 +24,11 @@ namespace glm namespace gtc{ //! GLM_GTC_swizzle extension - namespace glm_gtc_swizzle{ + namespace swizzle{ - }//namespace closest_point + }//namespace swizzle }//namespace gtc }//namespace glm diff --git a/glm/gtc/swizzle.inl b/glm/gtc/swizzle.inl index be2e265f..b072df20 100644 --- a/glm/gtc/swizzle.inl +++ b/glm/gtc/swizzle.inl @@ -3,58 +3,48 @@ namespace gtc{ namespace glm_gtc_swizzle { template - inline typename tvec4::value_type swizzle + inline T swizzle ( detail::tvec4 const & v, comp x - ) const + ) { return v[x]; } template - inline tvec2 tvec4::swizzle + inline detail::tvec2 swizzle ( detail::tvec4 const & v, comp x, comp y - ) const + ) { - return tvec2( - (*this)[x], - (*this)[y]); + return detail::tvec2( + v[x], + v[y]); } template - inline tvec3 tvec4::swizzle + inline detail::tvec3 swizzle ( detail::tvec4 const & v, comp x, comp y, comp z - ) const + ) { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); + return detail::tvec3( + v[x], + v[y], + v[z]); } template - inline tvec4 tvec4::swizzle - ( - detail::tvec4 const & v, - comp x, comp y, comp z, comp w - ) const - { - return tvec4(v[x], v[y], v[z], v[w]); - } - - template - inline tref4 swizzle + inline detail::tref4 swizzle ( detail::tvec4 const & v, comp x, comp y, comp z, comp w ) { - return tref4(v[x], v[y], v[z], v[w]); + return detail::tref4(v[x], v[y], v[z], v[w]); } }//namespace glm_gtc_swizzle