diff --git a/deps/glm/detail/func_common.inl b/deps/glm/detail/func_common.inl index 967c60a7ca..afd5afa816 100644 --- a/deps/glm/detail/func_common.inl +++ b/deps/glm/detail/func_common.inl @@ -45,9 +45,6 @@ namespace detail { GLM_FUNC_QUALIFIER static genFIType call(genFIType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_signed, - "'abs' only accept floating-point and integer scalar or vector inputs"); return x >= genFIType(0) ? x : -x; } }; @@ -57,9 +54,6 @@ namespace detail { GLM_FUNC_QUALIFIER static genFIType call(genFIType const & x) { - GLM_STATIC_ASSERT( - !std::numeric_limits::is_signed && std::numeric_limits::is_integer, - "'abs' only accept floating-point and integer scalar or vector inputs"); return x; } }; @@ -69,8 +63,6 @@ namespace detail { GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, vecType const & a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'mix' only accept floating-point inputs for the interpolator a"); - return vecType(vecType(x) + a * vecType(y - x)); } }; @@ -92,8 +84,6 @@ namespace detail { GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, U const & a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'mix' only accept floating-point inputs for the interpolator a"); - return vecType(vecType(x) + a * vecType(y - x)); } }; @@ -112,8 +102,6 @@ namespace detail { GLM_FUNC_QUALIFIER static T call(T const & x, T const & y, U const & a) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'mix' only accept floating-point inputs for the interpolator a"); - return static_cast(static_cast(x) + a * static_cast(y - x)); } }; @@ -148,10 +136,6 @@ namespace detail genFIType const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || - (std::numeric_limits::is_signed && std::numeric_limits::is_integer), "'sign' only accept signed inputs"); - if(x > genFIType(0)) return genFIType(1); else if(x < genFIType(0)) @@ -165,10 +149,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType floor(genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'floor' only accept floating-point inputs"); - return ::std::floor(x); } @@ -178,10 +158,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType trunc(genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'trunc' only accept floating-point inputs"); - // TODO, add C++11 std::trunk return x < 0 ? -floor(-x) : floor(x); } @@ -192,10 +168,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType round(genType const& x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'round' only accept floating-point inputs"); - // TODO, add C++11 std::round return x < 0 ? genType(int(x - genType(0.5))) : genType(int(x + genType(0.5))); } @@ -206,10 +178,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType roundEven(genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'roundEven' only accept floating-point inputs"); - int Integer = static_cast(x); genType IntegerPart = static_cast(Integer); genType FractionalPart = fract(x); @@ -229,10 +197,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType ceil(genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'ceil' only accept floating-point inputs"); - return ::std::ceil(x); } @@ -245,10 +209,6 @@ namespace detail genType const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'fract' only accept floating-point inputs"); - return x - floor(x); } @@ -262,10 +222,6 @@ namespace detail genType const & y ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'mod' only accept floating-point inputs"); - return x - y * floor(x / y); } @@ -280,10 +236,6 @@ namespace detail genType & i ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'modf' only accept floating-point inputs"); - return std::modf(x, &i); } @@ -334,10 +286,6 @@ namespace detail genType const & y ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'min' only accept floating-point or integer inputs"); - return x < y ? x : y; } @@ -352,10 +300,6 @@ namespace detail genType const & y ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'max' only accept floating-point or integer inputs"); - return x > y ? x : y; } @@ -371,10 +315,6 @@ namespace detail genType const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return min(maxVal, max(minVal, x)); } @@ -386,10 +326,6 @@ namespace detail T const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return detail::tvec2( clamp(x.x, minVal, maxVal), clamp(x.y, minVal, maxVal)); @@ -403,10 +339,6 @@ namespace detail T const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return detail::tvec3( clamp(x.x, minVal, maxVal), clamp(x.y, minVal, maxVal), @@ -421,10 +353,6 @@ namespace detail T const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return detail::tvec4( clamp(x.x, minVal, maxVal), clamp(x.y, minVal, maxVal), @@ -440,10 +368,6 @@ namespace detail detail::tvec2 const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return detail::tvec2( clamp(x.x, minVal.x, maxVal.x), clamp(x.y, minVal.y, maxVal.y)); @@ -457,10 +381,6 @@ namespace detail detail::tvec3 const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return detail::tvec3( clamp(x.x, minVal.x, maxVal.x), clamp(x.y, minVal.y, maxVal.y), @@ -475,10 +395,6 @@ namespace detail detail::tvec4 const & maxVal ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "'clamp' only accept floating-point or integer inputs"); - return detail::tvec4( clamp(x.x, minVal.x, maxVal.x), clamp(x.y, minVal.y, maxVal.y), @@ -537,10 +453,6 @@ namespace detail vecType const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'step' only accept floating-point inputs"); - return mix(vecType(1), vecType(0), glm::lessThan(x, vecType(edge))); } @@ -553,10 +465,6 @@ namespace detail genType const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); return tmp * tmp * (genType(3) - genType(2) * tmp); } @@ -569,10 +477,6 @@ namespace detail detail::tvec2 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - return detail::tvec2( smoothstep(edge0, edge1, x.x), smoothstep(edge0, edge1, x.y)); @@ -586,10 +490,6 @@ namespace detail detail::tvec3 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - return detail::tvec3( smoothstep(edge0, edge1, x.x), smoothstep(edge0, edge1, x.y), @@ -604,10 +504,6 @@ namespace detail detail::tvec4 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - return detail::tvec4( smoothstep(edge0, edge1, x.x), smoothstep(edge0, edge1, x.y), @@ -623,10 +519,6 @@ namespace detail detail::tvec2 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - return detail::tvec2( smoothstep(edge0.x, edge1.x, x.x), smoothstep(edge0.y, edge1.y, x.y)); @@ -640,10 +532,6 @@ namespace detail detail::tvec3 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - return detail::tvec3( smoothstep(edge0.x, edge1.x, x.x), smoothstep(edge0.y, edge1.y, x.y), @@ -658,10 +546,6 @@ namespace detail detail::tvec4 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'smoothstep' only accept floating-point inputs"); - return detail::tvec4( smoothstep(edge0.x, edge1.x, x.x), smoothstep(edge0.y, edge1.y, x.y), @@ -673,10 +557,6 @@ namespace detail template GLM_FUNC_QUALIFIER bool isnan(genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isnan' only accept floating-point inputs"); - # if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) return _isnan(x) != 0; # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)) @@ -698,10 +578,6 @@ namespace detail detail::tvec2 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isnan' only accept floating-point inputs"); - return typename detail::tvec2::bool_type( isnan(x.x), isnan(x.y)); @@ -713,10 +589,6 @@ namespace detail detail::tvec3 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isnan' only accept floating-point inputs"); - return typename detail::tvec3::bool_type( isnan(x.x), isnan(x.y), @@ -729,10 +601,6 @@ namespace detail detail::tvec4 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isnan' only accept floating-point inputs"); - return typename detail::tvec4::bool_type( isnan(x.x), isnan(x.y), @@ -744,10 +612,6 @@ namespace detail GLM_FUNC_QUALIFIER bool isinf( genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isinf' only accept floating-point inputs"); - # if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)) @@ -770,10 +634,6 @@ namespace detail detail::tvec2 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isinf' only accept floating-point inputs"); - return typename detail::tvec2::bool_type( isinf(x.x), isinf(x.y)); @@ -785,10 +645,6 @@ namespace detail detail::tvec3 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isinf' only accept floating-point inputs"); - return typename detail::tvec3::bool_type( isinf(x.x), isinf(x.y), @@ -801,10 +657,6 @@ namespace detail detail::tvec4 const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'isinf' only accept floating-point inputs"); - return typename detail::tvec4::bool_type( isinf(x.x), isinf(x.y), @@ -880,10 +732,6 @@ namespace detail int & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'frexp' only accept floating-point inputs"); - return std::frexp(x, exp); } @@ -894,10 +742,6 @@ namespace detail detail::tvec2 & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'frexp' only accept floating-point inputs"); - return detail::tvec2( frexp(x.x, exp.x), frexp(x.y, exp.y)); @@ -910,10 +754,6 @@ namespace detail detail::tvec3 & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'frexp' only accept floating-point inputs"); - return detail::tvec3( frexp(x.x, exp.x), frexp(x.y, exp.y), @@ -927,10 +767,6 @@ namespace detail detail::tvec4 & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'frexp' only accept floating-point inputs"); - return detail::tvec4( frexp(x.x, exp.x), frexp(x.y, exp.y), @@ -945,10 +781,6 @@ namespace detail int const & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'frexp' only accept floating-point inputs"); - return std::ldexp(x, exp); } @@ -959,10 +791,6 @@ namespace detail detail::tvec2 const & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'ldexp' only accept floating-point inputs"); - return detail::tvec2( ldexp(x.x, exp.x), ldexp(x.y, exp.y)); @@ -975,10 +803,6 @@ namespace detail detail::tvec3 const & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'ldexp' only accept floating-point inputs"); - return detail::tvec3( ldexp(x.x, exp.x), ldexp(x.y, exp.y), @@ -992,10 +816,6 @@ namespace detail detail::tvec4 const & exp ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'ldexp' only accept floating-point inputs"); - return detail::tvec4( ldexp(x.x, exp.x), ldexp(x.y, exp.y), diff --git a/deps/glm/detail/func_exponential.inl b/deps/glm/detail/func_exponential.inl index 830256fc15..676f96c062 100644 --- a/deps/glm/detail/func_exponential.inl +++ b/deps/glm/detail/func_exponential.inl @@ -85,10 +85,6 @@ namespace detail genType const & y ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'pow' only accept floating-point inputs"); - return std::pow(x, y); } @@ -101,10 +97,6 @@ namespace detail genType const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'exp' only accept floating-point inputs"); - return std::exp(x); } @@ -117,10 +109,6 @@ namespace detail genType const & x ) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'log' only accept floating-point inputs"); - return std::log(x); } @@ -130,10 +118,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType exp2(genType const & x) { - GLM_STATIC_ASSERT( - std::numeric_limits::is_iec559, - "'exp2' only accept floating-point inputs"); - return std::exp(static_cast(0.69314718055994530941723212145818) * x); } @@ -143,9 +127,6 @@ namespace detail template GLM_FUNC_QUALIFIER genType log2(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "GLM core 'log2' only accept floating-point inputs. Include for additional integer support."); - assert(x > genType(0)); // log2 is only defined on the range (0, inf] return detail::compute_log2::is_iec559>()(x); } @@ -208,7 +189,6 @@ namespace detail template class vecType> GLM_FUNC_QUALIFIER vecType sqrt(vecType const & x) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sqrt' only accept floating-point inputs"); return detail::compute_sqrt::call(x); } @@ -229,7 +209,6 @@ namespace detail vecType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'inversesqrt' only accept floating-point inputs"); return detail::compute_inversesqrt::call(x); } diff --git a/deps/glm/detail/func_geometric.inl b/deps/glm/detail/func_geometric.inl index 5cd39f3d89..718b253bed 100644 --- a/deps/glm/detail/func_geometric.inl +++ b/deps/glm/detail/func_geometric.inl @@ -85,8 +85,6 @@ namespace detail genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length' only accept floating-point inputs"); - genType sqr = x * x; return sqrt(sqr); } @@ -94,8 +92,6 @@ namespace detail template GLM_FUNC_QUALIFIER T length(detail::tvec2 const & v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length' only accept floating-point inputs"); - T sqr = v.x * v.x + v.y * v.y; return sqrt(sqr); } @@ -103,8 +99,6 @@ namespace detail template GLM_FUNC_QUALIFIER T length(detail::tvec3 const & v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length' only accept floating-point inputs"); - T sqr = v.x * v.x + v.y * v.y + v.z * v.z; return sqrt(sqr); } @@ -112,8 +106,6 @@ namespace detail template GLM_FUNC_QUALIFIER T length(detail::tvec4 const & v) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'length' only accept floating-point inputs"); - T sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; return sqrt(sqr); } @@ -126,8 +118,6 @@ namespace detail genType const & p1 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'distance' only accept floating-point inputs"); - return length(p1 - p0); } @@ -138,8 +128,6 @@ namespace detail detail::tvec2 const & p1 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'distance' only accept floating-point inputs"); - return length(p1 - p0); } @@ -150,8 +138,6 @@ namespace detail detail::tvec3 const & p1 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'distance' only accept floating-point inputs"); - return length(p1 - p0); } @@ -162,8 +148,6 @@ namespace detail detail::tvec4 const & p1 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'distance' only accept floating-point inputs"); - return length(p1 - p0); } @@ -175,7 +159,6 @@ namespace detail T const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' only accept floating-point inputs"); return detail::compute_dot::call(x, y); } @@ -186,7 +169,6 @@ namespace detail vecType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' only accept floating-point inputs"); return detail::compute_dot::call(x, y); } @@ -215,8 +197,6 @@ namespace detail detail::tvec3 const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' only accept floating-point inputs"); - return detail::tvec3( x.y * y.z - y.y * x.z, x.z * y.x - y.z * x.x, @@ -230,8 +210,6 @@ namespace detail genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' only accept floating-point inputs"); - return x < genType(0) ? genType(-1) : genType(1); } @@ -242,8 +220,6 @@ namespace detail detail::tvec2 const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' only accept floating-point inputs"); - T sqr = x.x * x.x + x.y * x.y; return x * inversesqrt(sqr); } @@ -254,8 +230,6 @@ namespace detail detail::tvec3 const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' only accept floating-point inputs"); - T sqr = x.x * x.x + x.y * x.y + x.z * x.z; return x * inversesqrt(sqr); } @@ -266,8 +240,6 @@ namespace detail detail::tvec4 const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'normalize' only accept floating-point inputs"); - T sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; return x * inversesqrt(sqr); } @@ -304,8 +276,6 @@ namespace detail genType const & eta ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'refract' only accept floating-point inputs"); - genType dotValue = dot(N, I); genType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue); if(k < genType(0)) @@ -322,8 +292,6 @@ namespace detail T const & eta ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'refract' only accept floating-point inputs"); - T dotValue = dot(N, I); T k = T(1) - eta * eta * (T(1) - dotValue * dotValue); if(k < T(0)) diff --git a/deps/glm/detail/func_trigonometric.inl b/deps/glm/detail/func_trigonometric.inl index 6dc322371c..2804ba3b78 100644 --- a/deps/glm/detail/func_trigonometric.inl +++ b/deps/glm/detail/func_trigonometric.inl @@ -39,8 +39,6 @@ namespace glm genType const & degrees ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'radians' only accept floating-point input"); - return degrees * genType(0.01745329251994329576923690768489); } @@ -53,8 +51,6 @@ namespace glm genType const & radians ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'degrees' only accept floating-point input"); - return radians * genType(57.295779513082320876798154814105); } @@ -67,8 +63,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sin' only accept floating-point input"); - return genType(::std::sin(angle)); } @@ -78,8 +72,6 @@ namespace glm template GLM_FUNC_QUALIFIER genType cos(genType const & angle) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cos' only accept floating-point input"); - return genType(::std::cos(angle)); } @@ -92,8 +84,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'tan' only accept floating-point input"); - return genType(::std::tan(angle)); } @@ -106,8 +96,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asin' only accept floating-point input"); - return genType(::std::asin(x)); } @@ -120,8 +108,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acos' only accept floating-point input"); - return genType(::std::acos(x)); } @@ -135,8 +121,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'atan' only accept floating-point input"); - return genType(::std::atan2(y, x)); } @@ -148,8 +132,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'atan' only accept floating-point input"); - return genType(::std::atan(x)); } @@ -162,8 +144,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sinh' only accept floating-point input"); - return genType(std::sinh(angle)); } @@ -176,8 +156,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cosh' only accept floating-point input"); - return genType(std::cosh(angle)); } @@ -190,8 +168,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'tanh' only accept floating-point input"); - return genType(std::tanh(angle)); } @@ -204,8 +180,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asinh' only accept floating-point input"); - return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); } @@ -218,8 +192,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acosh' only accept floating-point input"); - if(x < genType(1)) return genType(0); return log(x + sqrt(x * x - genType(1))); @@ -234,8 +206,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'atanh' only accept floating-point input"); - if(abs(x) >= genType(1)) return 0; return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); diff --git a/deps/glm/detail/func_vector_relational.inl b/deps/glm/detail/func_vector_relational.inl index befcb87eeb..353911c360 100644 --- a/deps/glm/detail/func_vector_relational.inl +++ b/deps/glm/detail/func_vector_relational.inl @@ -37,10 +37,6 @@ namespace glm vecType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors"); - assert(x.length() == y.length()); - typename vecType::bool_type Result(vecType::_null); for(int i = 0; i < x.length(); ++i) Result[i] = x[i] < y[i]; @@ -55,10 +51,6 @@ namespace glm vecType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors"); - assert(x.length() == y.length()); - typename vecType::bool_type Result(vecType::_null); for(int i = 0; i < x.length(); ++i) Result[i] = x[i] <= y[i]; @@ -72,10 +64,6 @@ namespace glm vecType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors"); - assert(x.length() == y.length()); - typename vecType::bool_type Result(vecType::_null); for(int i = 0; i < x.length(); ++i) Result[i] = x[i] > y[i]; @@ -89,10 +77,6 @@ namespace glm vecType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, - "Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors"); - assert(x.length() == y.length()); - typename vecType::bool_type Result(vecType::_null); for(int i = 0; i < x.length(); ++i) Result[i] = x[i] >= y[i]; diff --git a/deps/glm/detail/type_mat4x4.inl b/deps/glm/detail/type_mat4x4.inl index 992331f7c2..61f355a0b6 100644 --- a/deps/glm/detail/type_mat4x4.inl +++ b/deps/glm/detail/type_mat4x4.inl @@ -178,26 +178,6 @@ namespace detail X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); - - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid."); - - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid."); - - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); - this->value[0] = col_type(static_cast(x1), value_type(y1), value_type(z1), value_type(w1)); this->value[1] = col_type(static_cast(x2), value_type(y2), value_type(z2), value_type(w2)); this->value[2] = col_type(static_cast(x3), value_type(y3), value_type(z3), value_type(w3)); @@ -214,11 +194,6 @@ namespace detail tvec4 const & v4 ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559 || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); - this->value[0] = col_type(v1); this->value[1] = col_type(v2); this->value[2] = col_type(v3); diff --git a/deps/glm/gtc/reciprocal.inl b/deps/glm/gtc/reciprocal.inl index a3d3207e46..34394f580a 100644 --- a/deps/glm/gtc/reciprocal.inl +++ b/deps/glm/gtc/reciprocal.inl @@ -38,8 +38,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sec' only accept floating-point values"); - return genType(1) / glm::cos(angle); } @@ -52,8 +50,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csc' only accept floating-point values"); - return genType(1) / glm::sin(angle); } @@ -66,8 +62,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cot' only accept floating-point values"); - return genType(1) / glm::tan(angle); } @@ -80,8 +74,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asec' only accept floating-point values"); - return acos(genType(1) / x); } @@ -94,8 +86,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsc' only accept floating-point values"); - return asin(genType(1) / x); } @@ -108,8 +98,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acot' only accept floating-point values"); - genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); return pi_over_2 - atan(x); } @@ -123,8 +111,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'sech' only accept floating-point values"); - return genType(1) / glm::cosh(angle); } @@ -137,8 +123,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'csch' only accept floating-point values"); - return genType(1) / glm::sinh(angle); } @@ -151,8 +135,6 @@ namespace glm genType const & angle ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'coth' only accept floating-point values"); - return glm::cosh(angle) / glm::sinh(angle); } @@ -165,8 +147,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'asech' only accept floating-point values"); - return acosh(genType(1) / x); } @@ -179,8 +159,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acsch' only accept floating-point values"); - return asinh(genType(1) / x); } @@ -193,8 +171,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'acoth' only accept floating-point values"); - return atanh(genType(1) / x); } diff --git a/deps/glm/gtx/bit.inl b/deps/glm/gtx/bit.inl index 5a407c6da3..fb04bec77c 100644 --- a/deps/glm/gtx/bit.inl +++ b/deps/glm/gtx/bit.inl @@ -167,8 +167,6 @@ namespace glm template GLM_FUNC_QUALIFIER genType bitRevert(genType const & In) { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRevert' only accept integer values"); - genType Out = 0; std::size_t BitSize = sizeof(genType) * 8; for(std::size_t i = 0; i < BitSize; ++i) @@ -182,8 +180,6 @@ namespace glm template GLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift) { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateRight' only accept integer values"); - std::size_t BitSize = sizeof(genType) * 8; return (In << Shift) | (In >> (BitSize - Shift)); } @@ -230,8 +226,6 @@ namespace glm template GLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift) { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateLeft' only accept integer values"); - std::size_t BitSize = sizeof(genType) * 8; return (In >> Shift) | (In << (BitSize - Shift)); } diff --git a/deps/glm/gtx/fast_square_root.inl b/deps/glm/gtx/fast_square_root.inl index dd9734a6ee..6a320db0cc 100644 --- a/deps/glm/gtx/fast_square_root.inl +++ b/deps/glm/gtx/fast_square_root.inl @@ -16,8 +16,6 @@ namespace glm genType const & x ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'fastSqrt' only accept floating-point input"); - return genType(1) / fastInverseSqrt(x); } diff --git a/deps/glm/gtx/vector_angle.inl b/deps/glm/gtx/vector_angle.inl index d24c1ea1b3..6ce5e983f4 100644 --- a/deps/glm/gtx/vector_angle.inl +++ b/deps/glm/gtx/vector_angle.inl @@ -16,8 +16,6 @@ namespace glm genType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'angle' only accept floating-point inputs"); - genType const Angle(acos(clamp(dot(x, y), genType(-1), genType(1)))); #ifdef GLM_FORCE_RADIANS @@ -35,8 +33,6 @@ namespace glm vecType const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'angle' only accept floating-point inputs"); - T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); #ifdef GLM_FORCE_RADIANS @@ -55,8 +51,6 @@ namespace glm detail::tvec2 const & y ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); - T const Dot = clamp(dot(x, y), T(-1), T(1)); #ifdef GLM_FORCE_RADIANS @@ -80,8 +74,6 @@ namespace glm detail::tvec3 const & ref ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); - T const Dot = clamp(dot(x, y), T(-1), T(1)); #ifdef GLM_FORCE_RADIANS diff --git a/deps/glm/gtx/vector_query.inl b/deps/glm/gtx/vector_query.inl index 94881e027b..dcd8831455 100644 --- a/deps/glm/gtx/vector_query.inl +++ b/deps/glm/gtx/vector_query.inl @@ -94,8 +94,6 @@ namespace detail T const & epsilon ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'areCollinear' only accept floating-point inputs"); - return detail::compute_areCollinear::call(v0, v1, epsilon); } @@ -107,8 +105,6 @@ namespace detail T const & epsilon ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'areOrthogonal' only accept floating-point inputs"); - return abs(dot(v0, v1)) <= max( static_cast(1), length(v0)) * max(static_cast(1), length(v1)) * epsilon; @@ -121,8 +117,6 @@ namespace detail T const & epsilon ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isNormalized' only accept floating-point inputs"); - return abs(length(v) - static_cast(1)) <= static_cast(2) * epsilon; } @@ -133,8 +127,6 @@ namespace detail T const & epsilon ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isNull' only accept floating-point inputs"); - return length(v) <= epsilon; } @@ -145,8 +137,6 @@ namespace detail T const & epsilon ) { - GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'isCompNull' only accept floating-point inputs"); - return detail::compute_isCompNull::call(v, epsilon); }