From 011ba52716b12c82dc03ca2e62bbfa8c5a02e428 Mon Sep 17 00:00:00 2001 From: christophe Date: Mon, 25 Dec 2023 18:48:48 +0100 Subject: [PATCH] Add GLM_FORCE_UNRESTRICTED_FLOAT to skip static assert when using not float types --- glm/gtx/norm.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/gtx/norm.inl b/glm/gtx/norm.inl index 8cc84e7ca..4a9f79645 100644 --- a/glm/gtx/norm.inl +++ b/glm/gtx/norm.inl @@ -18,28 +18,28 @@ namespace detail template GLM_FUNC_QUALIFIER genType length2(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_SCALAR_TYPES, "'length2' accepts only floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'length2' accepts only floating-point inputs"); return x * x; } template GLM_FUNC_QUALIFIER T length2(vec const& v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_SCALAR_TYPES, "'length2' accepts only floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'length2' accepts only floating-point inputs"); return detail::compute_length2::value>::call(v); } template GLM_FUNC_QUALIFIER T distance2(T p0, T p1) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_SCALAR_TYPES, "'distance2' accepts only floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'distance2' accepts only floating-point inputs"); return length2(p1 - p0); } template GLM_FUNC_QUALIFIER T distance2(vec const& p0, vec const& p1) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_SCALAR_TYPES, "'distance2' accepts only floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'distance2' accepts only floating-point inputs"); return length2(p1 - p0); }