diff --git a/glm/core/func_exponential.inl b/glm/core/func_exponential.inl index e76a927e..1b08786d 100644 --- a/glm/core/func_exponential.inl +++ b/glm/core/func_exponential.inl @@ -146,6 +146,7 @@ namespace _detail ) { GLM_STATIC_ASSERT(detail::type::is_float, "'inversesqrt' only accept floating-point input"); + assert(x > genType(0)); return genType(1) / ::std::sqrt(x); } diff --git a/readme.txt b/readme.txt index ff087030..6cfa8579 100644 --- a/readme.txt +++ b/readme.txt @@ -42,6 +42,7 @@ GLM 0.9.4.4: 2013-0X-XX - Fixed slerp when costheta is close to 1 - Fixed mat4x2 value_type constructor - Fixed glm.natvis for Visual C++ 12 #82 +- Added assert in inversesqrt to detect division by zero. #61 ================================================================================ GLM 0.9.4.3: 2013-03-20