diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index bdcb4cfe..f4167d4b 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -648,11 +648,14 @@ namespace detail # endif template - GLM_FUNC_QUALIFIER vec isnan(vec const& x) + GLM_FUNC_QUALIFIER vec isnan(vec const& v) { GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isnan' only accept floating-point inputs"); - return detail::functor1::call(glm::isnan, x); + vec Result; + for (length_t l = 0; l < v.length(); ++l) + Result[l] = glm::isnan(v[l]); + return Result; } # if GLM_HAS_CXX11_STL @@ -687,11 +690,14 @@ namespace detail # endif template - GLM_FUNC_QUALIFIER vec isinf(vec const& x) + GLM_FUNC_QUALIFIER vec isinf(vec const& v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isnan' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isinf' only accept floating-point inputs"); - return detail::functor1::call(glm::isinf, x); + vec Result; + for (length_t l = 0; l < v.length(); ++l) + Result[l] = glm::isinf(v[l]); + return Result; } GLM_FUNC_QUALIFIER int floatBitsToInt(float const& v)