diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 83252de4..479d9b6a 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -609,7 +609,9 @@ namespace detail GLM_FUNC_QUALIFIER int floatBitsToInt(float const & v) { - return reinterpret_cast(const_cast(v)); + int Bits; + std::memcpy(&Bits, &v, sizeof(Bits)); + return Bits; } template