diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index aa0ee38c..d90a8af9 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -1312,6 +1312,7 @@ namespace detail isnan(x.w)); } + template <> GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) { union @@ -1324,10 +1325,10 @@ namespace detail return fi.i; } - template + template <> GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt ( - detail::tvec2 const & value + detail::tvec2 const & value ) { return detail::tvec2( @@ -1335,28 +1336,32 @@ namespace detail floatBitsToInt(value.y)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToInt ( - detail::tvec3 const & value + detail::tvec3 const & value ) { return detail::tvec3( floatBitsToInt(value.x), - floatBitsToInt(value.y)); + floatBitsToInt(value.y), + floatBitsToInt(value.z)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToInt ( - detail::tvec4 const & value + detail::tvec4 const & value ) { return detail::tvec4( floatBitsToInt(value.x), - floatBitsToInt(value.y)); + floatBitsToInt(value.y), + floatBitsToInt(value.z), + floatBitsToInt(value.w)); } + template<> GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) { union @@ -1369,10 +1374,10 @@ namespace detail return fu.u; } - template + template <> GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint ( - detail::tvec2 const & value + detail::tvec2 const & value ) { return detail::tvec2( @@ -1380,10 +1385,10 @@ namespace detail floatBitsToUint(value.y)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToUint ( - detail::tvec3 const & value + detail::tvec3 const & value ) { return detail::tvec3( @@ -1392,10 +1397,10 @@ namespace detail floatBitsToUint(value.z)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToUint ( - detail::tvec4 const & value + detail::tvec4 const & value ) { return detail::tvec4( @@ -1417,10 +1422,10 @@ namespace detail return fi.f; } - template + template <> GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat ( - detail::tvec2 const & value + detail::tvec2 const & value ) { return detail::tvec2( @@ -1428,10 +1433,10 @@ namespace detail intBitsToFloat(value.y)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec3 intBitsToFloat ( - detail::tvec3 const & value + detail::tvec3 const & value ) { return detail::tvec3( @@ -1440,7 +1445,7 @@ namespace detail intBitsToFloat(value.z)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec4 intBitsToFloat ( detail::tvec4 const & value @@ -1453,6 +1458,7 @@ namespace detail intBitsToFloat(value.w)); } + template<> GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) { union @@ -1465,10 +1471,10 @@ namespace detail return fu.f; } - template + template <> GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat ( - detail::tvec2 const & value + detail::tvec2 const & value ) { return detail::tvec2( @@ -1476,10 +1482,10 @@ namespace detail uintBitsToFloat(value.y)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec3 uintBitsToFloat ( - detail::tvec3 const & value + detail::tvec3 const & value ) { return detail::tvec3( @@ -1488,10 +1494,10 @@ namespace detail uintBitsToFloat(value.z)); } - template + template <> GLM_FUNC_QUALIFIER detail::tvec4 uintBitsToFloat ( - detail::tvec4 const & value + detail::tvec4 const & value ) { return detail::tvec4(