diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl index 2151d8b6..5267ea3e 100644 --- a/glm/detail/func_exponential.inl +++ b/glm/detail/func_exponential.inl @@ -25,6 +25,8 @@ namespace detail { GLM_FUNC_QUALIFIER static vec call(vec const& v) { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'log2' only accept floating-point inputs. Include for integer inputs."); + return detail::functor1::call(log2, v); } }; diff --git a/glm/gtc/integer.hpp b/glm/gtc/integer.hpp index c231d543..8749dd36 100644 --- a/glm/gtc/integer.hpp +++ b/glm/gtc/integer.hpp @@ -35,15 +35,6 @@ namespace glm template GLM_FUNC_DECL genIUType log2(genIUType x); - template - GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y); - - template - GLM_FUNC_DECL vec mod(vec const& x, T y); - - template - GLM_FUNC_DECL vec mod(vec const& x, vec const& y); - /// Returns a value equal to the nearest integer to x. /// The fraction 0.5 will round in a direction chosen by the /// implementation, presumably the direction that is fastest. diff --git a/test/gtc/gtc_integer.cpp b/test/gtc/gtc_integer.cpp index 1e56bfa9..8ec9fa66 100644 --- a/test/gtc/gtc_integer.cpp +++ b/test/gtc/gtc_integer.cpp @@ -26,7 +26,7 @@ namespace log2_ glm::ivec3 D0(glm::log2(glm::vec3(16.f))); glm::ivec4 E0(glm::log2(glm::vec4(16.f))); - int A1 = glm::log2(int(16)); + int A1 = glm::log2(int(1024)); glm::ivec1 B1 = glm::log2(glm::ivec1(16)); glm::ivec2 C1 = glm::log2(glm::ivec2(16)); glm::ivec3 D1 = glm::log2(glm::ivec3(16));