diff --git a/glm/detail/compute_common.hpp b/glm/detail/compute_common.hpp index 7b0af90e..83362bc7 100644 --- a/glm/detail/compute_common.hpp +++ b/glm/detail/compute_common.hpp @@ -16,7 +16,7 @@ namespace detail GLM_FUNC_QUALIFIER GLM_CONSTEXPR static genFIType call(genFIType x) { GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_signed, + std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_signed, "'abs' only accept floating-point and integer scalar or vector inputs"); return x >= genFIType(0) ? x : -x; diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 2fc29d6e..c90ba227 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -16,7 +16,7 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType min(genType x, genType y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs"); return (y < x) ? y : x; } @@ -24,7 +24,7 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType max(genType x, genType y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs"); return (x < y) ? y : x; } @@ -44,7 +44,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType round(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'round' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'round' only accept floating-point inputs"); return x < static_cast(0) ? static_cast(int(x - static_cast(0.5))) : static_cast(int(x + static_cast(0.5))); } @@ -57,7 +57,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType trunc(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'trunc' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'trunc' only accept floating-point inputs"); return x < static_cast(0) ? -std::floor(-x) : std::floor(x); } @@ -82,7 +82,7 @@ namespace detail { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& x, vec const& y, vec const& a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); return vec(vec(x) * (static_cast(1) - a) + vec(y) * a); } @@ -105,7 +105,7 @@ namespace detail { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec call(vec const& x, vec const& y, U const& a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); return vec(vec(x) * (static_cast(1) - a) + vec(y) * a); } @@ -125,7 +125,7 @@ namespace detail { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static T call(T const& x, T const& y, U const& a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'mix' only accept floating-point inputs for the interpolator a"); return static_cast(static_cast(x) * (static_cast(1) - a) + static_cast(y) * a); } @@ -213,7 +213,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec call(vec const& a, vec const& b) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'mod' only accept floating-point inputs. Include for integer inputs."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'mod' only accept floating-point inputs. Include for integer inputs."); return a - b * floor(a / b); } }; @@ -259,7 +259,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec call(vec const& edge0, vec const& edge1, vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs"); vec const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast(0), static_cast(1))); return tmp * tmp * (static_cast(3) - static_cast(2) * tmp); } @@ -284,7 +284,7 @@ namespace detail GLM_FUNC_QUALIFIER GLM_CONSTEXPR genFIType sign(genFIType x) { GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || (std::numeric_limits::is_signed && std::numeric_limits::is_integer), + std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || (std::numeric_limits::is_signed && std::numeric_limits::is_integer), "'sign' only accept signed inputs"); return detail::compute_sign<1, genFIType, defaultp, @@ -295,7 +295,7 @@ namespace detail GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec sign(vec const& x) { GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || (std::numeric_limits::is_signed && std::numeric_limits::is_integer), + std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || (std::numeric_limits::is_signed && std::numeric_limits::is_integer), "'sign' only accept signed inputs"); return detail::compute_sign::is_iec559, detail::is_aligned::value>::call(x); @@ -306,21 +306,21 @@ namespace detail template GLM_FUNC_QUALIFIER vec floor(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'floor' only accept floating-point inputs."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'floor' only accept floating-point inputs."); return detail::compute_floor::value>::call(x); } template GLM_FUNC_QUALIFIER vec trunc(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'trunc' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'trunc' only accept floating-point inputs"); return detail::compute_trunc::value>::call(x); } template GLM_FUNC_QUALIFIER vec round(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'round' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'round' only accept floating-point inputs"); return detail::compute_round::value>::call(x); } @@ -329,7 +329,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType roundEven(genType const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs"); return genType(int(x + genType(int(x) % 2))); } @@ -339,7 +339,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType roundEven(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs"); int Integer = static_cast(x); genType IntegerPart = static_cast(Integer); @@ -370,7 +370,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec roundEven(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'roundEven' only accept floating-point inputs"); return detail::functor1::call(roundEven, x); } @@ -379,7 +379,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec ceil(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'ceil' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ceil' only accept floating-point inputs"); return detail::compute_ceil::value>::call(x); } @@ -393,7 +393,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec fract(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fract' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fract' only accept floating-point inputs"); return detail::compute_fract::value>::call(x); } @@ -426,7 +426,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType modf(genType x, genType & i) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'modf' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'modf' only accept floating-point inputs"); return std::modf(x, &i); } @@ -476,7 +476,7 @@ namespace detail template GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec min(vec const& a, T b) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'min' only accept floating-point or integer inputs"); return detail::compute_min_vector::value>::call(a, vec(b)); } @@ -490,7 +490,7 @@ namespace detail template GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec max(vec const& a, T b) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'max' only accept floating-point or integer inputs"); return detail::compute_max_vector::value>::call(a, vec(b)); } @@ -504,21 +504,21 @@ namespace detail template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType clamp(genType x, genType minVal, genType maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); return min(max(x, minVal), maxVal); } template GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec clamp(vec const& x, T minVal, T maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); return detail::compute_clamp_vector::value>::call(x, vec(minVal), vec(maxVal)); } template GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec clamp(vec const& x, vec const& minVal, vec const& maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || std::numeric_limits::is_integer, "'clamp' only accept floating-point or integer inputs"); return detail::compute_clamp_vector::value>::call(x, minVal, maxVal); } @@ -563,7 +563,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType smoothstep(genType edge0, genType edge1, genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT || GLM_CONFIG_UNRESTRICTED_GENTYPE, "'smoothstep' only accept floating-point inputs"); genType const tmp(clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1))); return tmp * tmp * (genType(3) - genType(2) * tmp); @@ -587,7 +587,7 @@ namespace detail template GLM_FUNC_QUALIFIER bool isnan(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs"); # if GLM_HAS_CXX11_STL return std::isnan(x); @@ -612,7 +612,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec isnan(vec const& v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs"); vec Result; for (length_t l = 0; l < v.length(); ++l) @@ -626,7 +626,7 @@ namespace detail template GLM_FUNC_QUALIFIER bool isinf(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs"); # if GLM_HAS_CXX11_STL return std::isinf(x); @@ -654,7 +654,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec isinf(vec const& v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs"); vec Result; for (length_t l = 0; l < v.length(); ++l) @@ -751,7 +751,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType frexp(genType x, int& exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs"); return std::frexp(x, &exp); } @@ -759,7 +759,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec frexp(vec const& v, vec& exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'frexp' only accept floating-point inputs"); vec Result; for (length_t l = 0; l < v.length(); ++l) @@ -770,7 +770,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType ldexp(genType const& x, int const& exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs"); return std::ldexp(x, exp); } @@ -778,7 +778,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec ldexp(vec const& v, vec const& exp) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ldexp' only accept floating-point inputs"); vec Result; for (length_t l = 0; l < v.length(); ++l) diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl index d12b149d..2efcdc60 100644 --- a/glm/detail/func_exponential.inl +++ b/glm/detail/func_exponential.inl @@ -25,7 +25,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec call(vec const& v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'log2' only accept floating-point inputs. Include for integer inputs."); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'log2' only accept floating-point inputs. Include for integer inputs."); return detail::functor1::call(log2, v); } @@ -97,7 +97,7 @@ namespace detail template GLM_FUNC_QUALIFIER genType exp2(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'exp2' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'exp2' only accept floating-point inputs"); return std::exp(static_cast(0.69314718055994530941723212145818) * x); } @@ -127,7 +127,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec sqrt(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'sqrt' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sqrt' only accept floating-point inputs"); return detail::compute_sqrt::value>::call(x); } @@ -141,7 +141,7 @@ namespace detail template GLM_FUNC_QUALIFIER vec inversesqrt(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'inversesqrt' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'inversesqrt' only accept floating-point inputs"); return detail::compute_inversesqrt::value>::call(x); } }//namespace glm diff --git a/glm/detail/func_trigonometric.inl b/glm/detail/func_trigonometric.inl index c48211a7..9e6d9cfb 100644 --- a/glm/detail/func_trigonometric.inl +++ b/glm/detail/func_trigonometric.inl @@ -8,7 +8,7 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType radians(genType degrees) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'radians' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'radians' only accept floating-point input"); return degrees * static_cast(0.01745329251994329576923690768489); } @@ -23,7 +23,7 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType degrees(genType radians) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'degrees' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'degrees' only accept floating-point input"); return radians * static_cast(57.295779513082320876798154814105); } @@ -83,7 +83,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType atan(genType y, genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'atan' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'atan' only accept floating-point input"); return ::std::atan2(y, x); } @@ -136,7 +136,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType asinh(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'asinh' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'asinh' only accept floating-point input"); return (x < static_cast(0) ? static_cast(-1) : (x > static_cast(0) ? static_cast(1) : static_cast(0))) * log(std::abs(x) + sqrt(static_cast(1) + x * x)); } @@ -155,7 +155,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType acosh(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acosh' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acosh' only accept floating-point input"); if(x < static_cast(1)) return static_cast(0); @@ -176,7 +176,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType atanh(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'atanh' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'atanh' only accept floating-point input"); if(std::abs(x) >= static_cast(1)) return 0; diff --git a/glm/ext/quaternion_common.inl b/glm/ext/quaternion_common.inl index 7a189109..ad171f9d 100644 --- a/glm/ext/quaternion_common.inl +++ b/glm/ext/quaternion_common.inl @@ -3,7 +3,7 @@ namespace glm template GLM_FUNC_QUALIFIER qua mix(qua const& x, qua const& y, T a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'mix' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'mix' only accept floating-point inputs"); T const cosTheta = dot(x, y); @@ -28,7 +28,7 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua lerp(qua const& x, qua const& y, T a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'lerp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'lerp' only accept floating-point inputs"); // Lerp is only defined in [0, 1] assert(a >= static_cast(0)); @@ -40,7 +40,7 @@ namespace glm template GLM_FUNC_QUALIFIER qua slerp(qua const& x, qua const& y, T a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'slerp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'slerp' only accept floating-point inputs"); qua z = y; @@ -75,7 +75,7 @@ namespace glm template GLM_FUNC_QUALIFIER qua slerp(qua const& x, qua const& y, T a, S k) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'slerp' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'slerp' only accept floating-point inputs"); GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'slerp' only accept integer for spin count"); qua z = y; @@ -124,7 +124,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, bool, Q> isnan(qua const& q) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isnan' only accept floating-point inputs"); return vec<4, bool, Q>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w)); } @@ -132,7 +132,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec<4, bool, Q> isinf(qua const& q) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isinf' only accept floating-point inputs"); return vec<4, bool, Q>(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w)); } diff --git a/glm/ext/quaternion_geometric.inl b/glm/ext/quaternion_geometric.inl index c586e802..88dc4d63 100644 --- a/glm/ext/quaternion_geometric.inl +++ b/glm/ext/quaternion_geometric.inl @@ -3,7 +3,7 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR T dot(qua const& x, qua const& y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'dot' accepts only floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'dot' accepts only floating-point inputs"); return detail::compute_dot, T, detail::is_aligned::value>::call(x, y); } diff --git a/glm/ext/scalar_common.inl b/glm/ext/scalar_common.inl index 652ca92d..3d09fef0 100644 --- a/glm/ext/scalar_common.inl +++ b/glm/ext/scalar_common.inl @@ -30,7 +30,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fmin(T a, T b) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fmin' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fmin' only accept floating-point input"); if (isnan(a)) return b; @@ -41,7 +41,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fmin(T a, T b, T c) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fmin' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fmin' only accept floating-point input"); if (isnan(a)) return fmin(b, c); @@ -55,7 +55,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fmin(T a, T b, T c, T d) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fmin' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fmin' only accept floating-point input"); if (isnan(a)) return fmin(b, c, d); @@ -75,7 +75,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fmax(T a, T b) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fmax' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fmax' only accept floating-point input"); if (isnan(a)) return b; @@ -86,7 +86,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fmax(T a, T b, T c) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fmax' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fmax' only accept floating-point input"); if (isnan(a)) return fmax(b, c); @@ -100,7 +100,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fmax(T a, T b, T c, T d) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fmax' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fmax' only accept floating-point input"); if (isnan(a)) return fmax(b, c, d); @@ -117,7 +117,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType fclamp(genType x, genType minVal, genType maxVal) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fclamp' only accept floating-point or integer inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fclamp' only accept floating-point or integer inputs"); return fmin(fmax(x, minVal), maxVal); } @@ -153,7 +153,7 @@ namespace glm template GLM_FUNC_QUALIFIER int iround(genType const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'iround' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'iround' only accept floating-point inputs"); assert(static_cast(0.0) <= x); return static_cast(x + static_cast(0.5)); @@ -162,7 +162,7 @@ namespace glm template GLM_FUNC_QUALIFIER uint uround(genType const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'uround' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'uround' only accept floating-point inputs"); assert(static_cast(0.0) <= x); return static_cast(x + static_cast(0.5)); diff --git a/glm/ext/scalar_constants.inl b/glm/ext/scalar_constants.inl index 10e02262..b928e511 100644 --- a/glm/ext/scalar_constants.inl +++ b/glm/ext/scalar_constants.inl @@ -5,14 +5,14 @@ namespace glm template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'epsilon' only accepts floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'epsilon' only accepts floating-point inputs"); return std::numeric_limits::epsilon(); } template GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'pi' only accepts floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'pi' only accepts floating-point inputs"); return static_cast(3.14159265358979323846264338327950288); } diff --git a/glm/ext/scalar_integer.inl b/glm/ext/scalar_integer.inl index 6135ef98..d416197e 100644 --- a/glm/ext/scalar_integer.inl +++ b/glm/ext/scalar_integer.inl @@ -26,7 +26,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec call(vec const& x) { - GLM_STATIC_ASSERT(!std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'ceilPowerOfTwo' only accept integer scalar or vector inputs"); + GLM_STATIC_ASSERT(!std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ceilPowerOfTwo' only accept integer scalar or vector inputs"); vec const Sign(sign(x)); @@ -48,7 +48,7 @@ namespace detail { GLM_FUNC_QUALIFIER static vec call(vec const& x) { - GLM_STATIC_ASSERT(!std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'ceilPowerOfTwo' only accept integer scalar or vector inputs"); + GLM_STATIC_ASSERT(!std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'ceilPowerOfTwo' only accept integer scalar or vector inputs"); vec v(x); diff --git a/glm/ext/scalar_reciprocal.inl b/glm/ext/scalar_reciprocal.inl index 58a83f74..0cd5f87b 100644 --- a/glm/ext/scalar_reciprocal.inl +++ b/glm/ext/scalar_reciprocal.inl @@ -9,7 +9,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType sec(genType angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'sec' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sec' only accept floating-point values"); return genType(1) / glm::cos(angle); } @@ -17,7 +17,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType csc(genType angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'csc' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'csc' only accept floating-point values"); return genType(1) / glm::sin(angle); } @@ -25,7 +25,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType cot(genType angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'cot' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'cot' only accept floating-point values"); genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); return glm::tan(pi_over_2 - angle); @@ -35,7 +35,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType asec(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'asec' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'asec' only accept floating-point values"); return acos(genType(1) / x); } @@ -43,7 +43,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType acsc(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acsc' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acsc' only accept floating-point values"); return asin(genType(1) / x); } @@ -51,7 +51,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType acot(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acot' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acot' only accept floating-point values"); genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); return pi_over_2 - atan(x); @@ -61,7 +61,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType sech(genType angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'sech' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sech' only accept floating-point values"); return genType(1) / glm::cosh(angle); } @@ -69,7 +69,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType csch(genType angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'csch' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'csch' only accept floating-point values"); return genType(1) / glm::sinh(angle); } @@ -77,7 +77,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType coth(genType angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'coth' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'coth' only accept floating-point values"); return glm::cosh(angle) / glm::sinh(angle); } @@ -85,7 +85,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType asech(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'asech' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'asech' only accept floating-point values"); return acosh(genType(1) / x); } @@ -93,7 +93,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType acsch(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acsch' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acsch' only accept floating-point values"); return asinh(genType(1) / x); } @@ -101,7 +101,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType acoth(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acoth' only accept floating-point values"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acoth' only accept floating-point values"); return atanh(genType(1) / x); } }//namespace glm diff --git a/glm/ext/scalar_ulp.inl b/glm/ext/scalar_ulp.inl index c8fb863a..919403fd 100644 --- a/glm/ext/scalar_ulp.inl +++ b/glm/ext/scalar_ulp.inl @@ -219,7 +219,7 @@ namespace glm template GLM_FUNC_QUALIFIER T nextFloat(T x, int ULPs) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'next_float' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'next_float' only accept floating-point input"); assert(ULPs >= 0); T temp = x; @@ -257,7 +257,7 @@ namespace glm template GLM_FUNC_QUALIFIER T prevFloat(T x, int ULPs) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'prev_float' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'prev_float' only accept floating-point input"); assert(ULPs >= 0); T temp = x; diff --git a/glm/ext/vector_reciprocal.inl b/glm/ext/vector_reciprocal.inl index cb6eb6c5..b85102a2 100644 --- a/glm/ext/vector_reciprocal.inl +++ b/glm/ext/vector_reciprocal.inl @@ -9,7 +9,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec sec(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'sec' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sec' only accept floating-point inputs"); return static_cast(1) / detail::functor1::call(cos, x); } @@ -17,7 +17,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec csc(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'csc' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'csc' only accept floating-point inputs"); return static_cast(1) / detail::functor1::call(sin, x); } @@ -25,7 +25,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec cot(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'cot' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'cot' only accept floating-point inputs"); T const pi_over_2 = static_cast(3.1415926535897932384626433832795 / 2.0); return detail::functor1::call(tan, pi_over_2 - x); } @@ -34,7 +34,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec asec(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'asec' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'asec' only accept floating-point inputs"); return detail::functor1::call(acos, static_cast(1) / x); } @@ -42,7 +42,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec acsc(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acsc' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acsc' only accept floating-point inputs"); return detail::functor1::call(asin, static_cast(1) / x); } @@ -50,7 +50,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec acot(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acot' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acot' only accept floating-point inputs"); T const pi_over_2 = static_cast(3.1415926535897932384626433832795 / 2.0); return pi_over_2 - detail::functor1::call(atan, x); } @@ -59,7 +59,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec sech(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'sech' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'sech' only accept floating-point inputs"); return static_cast(1) / detail::functor1::call(cosh, x); } @@ -67,7 +67,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec csch(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'csch' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'csch' only accept floating-point inputs"); return static_cast(1) / detail::functor1::call(sinh, x); } @@ -75,7 +75,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec coth(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'coth' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'coth' only accept floating-point inputs"); return glm::cosh(x) / glm::sinh(x); } @@ -83,7 +83,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec asech(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'asech' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'asech' only accept floating-point inputs"); return detail::functor1::call(acosh, static_cast(1) / x); } @@ -91,7 +91,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec acsch(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acsch' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acsch' only accept floating-point inputs"); return detail::functor1::call(asinh, static_cast(1) / x); } @@ -99,7 +99,7 @@ namespace glm template GLM_FUNC_QUALIFIER vec acoth(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'acoth' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'acoth' only accept floating-point inputs"); return detail::functor1::call(atanh, static_cast(1) / x); } }//namespace glm diff --git a/glm/gtc/ulp.inl b/glm/gtc/ulp.inl index 3598e7bd..836c84b4 100644 --- a/glm/gtc/ulp.inl +++ b/glm/gtc/ulp.inl @@ -35,7 +35,7 @@ namespace glm template GLM_FUNC_QUALIFIER T next_float(T x, int ULPs) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'next_float' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'next_float' only accept floating-point input"); assert(ULPs >= 0); T temp = x; @@ -73,7 +73,7 @@ namespace glm template GLM_FUNC_QUALIFIER T prev_float(T x, int ULPs) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'prev_float' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'prev_float' only accept floating-point input"); assert(ULPs >= 0); T temp = x; diff --git a/glm/gtx/common.inl b/glm/gtx/common.inl index ccde8c82..4575b207 100644 --- a/glm/gtx/common.inl +++ b/glm/gtx/common.inl @@ -29,7 +29,7 @@ namespace detail template GLM_FUNC_QUALIFIER bool isdenormal(T const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); # if GLM_HAS_CXX11_STL return std::fpclassify(x) == FP_SUBNORMAL; @@ -44,7 +44,7 @@ namespace detail vec<1, T, Q> const& x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); return typename vec<1, T, Q>::bool_type( isdenormal(x.x)); @@ -56,7 +56,7 @@ namespace detail vec<2, T, Q> const& x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); return typename vec<2, T, Q>::bool_type( isdenormal(x.x), @@ -69,7 +69,7 @@ namespace detail vec<3, T, Q> const& x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); return typename vec<3, T, Q>::bool_type( isdenormal(x.x), @@ -83,7 +83,7 @@ namespace detail vec<4, T, Q> const& x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'isdenormal' only accept floating-point inputs"); return typename vec<4, T, Q>::bool_type( isdenormal(x.x), diff --git a/glm/gtx/exterior_product.inl b/glm/gtx/exterior_product.inl index 41169fef..690085d6 100644 --- a/glm/gtx/exterior_product.inl +++ b/glm/gtx/exterior_product.inl @@ -10,7 +10,7 @@ namespace detail { GLM_FUNC_QUALIFIER GLM_CONSTEXPR static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'cross' accepts only floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'cross' accepts only floating-point inputs"); return v.x * u.y - u.x * v.y; } diff --git a/glm/gtx/fast_square_root.inl b/glm/gtx/fast_square_root.inl index 827680c4..60fdb7a5 100644 --- a/glm/gtx/fast_square_root.inl +++ b/glm/gtx/fast_square_root.inl @@ -6,7 +6,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType fastSqrt(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fastSqrt' only accept floating-point input"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fastSqrt' only accept floating-point input"); return genType(1) / fastInverseSqrt(x); } @@ -34,7 +34,7 @@ namespace glm template GLM_FUNC_QUALIFIER genType fastLength(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fastLength' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fastLength' only accept floating-point inputs"); return abs(x); } @@ -42,7 +42,7 @@ namespace glm template GLM_FUNC_QUALIFIER T fastLength(vec const& x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'fastLength' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'fastLength' only accept floating-point inputs"); return fastSqrt(dot(x, x)); } diff --git a/glm/gtx/vector_angle.inl b/glm/gtx/vector_angle.inl index e56ef0d6..11e1a218 100644 --- a/glm/gtx/vector_angle.inl +++ b/glm/gtx/vector_angle.inl @@ -16,14 +16,14 @@ namespace glm template GLM_FUNC_QUALIFIER T angle(vec const& x, vec const& y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'angle' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'angle' only accept floating-point inputs"); return acos(clamp(dot(x, y), T(-1), T(1))); } template GLM_FUNC_QUALIFIER T orientedAngle(vec<2, T, Q> const& x, vec<2, T, Q> const& y) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'orientedAngle' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'orientedAngle' only accept floating-point inputs"); T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); T const partialCross = x.x * y.y - y.x * x.y; @@ -37,7 +37,7 @@ namespace glm template GLM_FUNC_QUALIFIER T orientedAngle(vec<3, T, Q> const& x, vec<3, T, Q> const& y, vec<3, T, Q> const& ref) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_FORCE_UNRESTRICTED_FLOAT, "'orientedAngle' only accept floating-point inputs"); + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || GLM_CONFIG_UNRESTRICTED_FLOAT, "'orientedAngle' only accept floating-point inputs"); T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); return mix(Angle, -Angle, dot(ref, cross(x, y)) < T(0));