mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(GLM) Start getting rid of static asserts
This commit is contained in:
parent
9fbc835308
commit
5fdb2247dd
180
deps/glm/detail/func_common.inl
vendored
180
deps/glm/detail/func_common.inl
vendored
@ -45,9 +45,6 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static genFIType call(genFIType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::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<genFIType>::is_signed && std::numeric_limits<genFIType>::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<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, "'mix' only accept floating-point inputs for the interpolator a");
|
||||
|
||||
return vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));
|
||||
}
|
||||
};
|
||||
@ -92,8 +84,6 @@ namespace detail
|
||||
{
|
||||
GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, U const & a)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, "'mix' only accept floating-point inputs for the interpolator a");
|
||||
|
||||
return vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(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<U>::is_iec559, "'mix' only accept floating-point inputs for the interpolator a");
|
||||
|
||||
return static_cast<T>(static_cast<U>(x) + a * static_cast<U>(y - x));
|
||||
}
|
||||
};
|
||||
@ -148,10 +136,6 @@ namespace detail
|
||||
genFIType const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genFIType>::is_iec559 ||
|
||||
(std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::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 <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType floor(genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::is_iec559,
|
||||
"'floor' only accept floating-point inputs");
|
||||
|
||||
return ::std::floor(x);
|
||||
}
|
||||
|
||||
@ -178,10 +158,6 @@ namespace detail
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType trunc(genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::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 <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType round(genType const& x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::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 <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType roundEven(genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::is_iec559,
|
||||
"'roundEven' only accept floating-point inputs");
|
||||
|
||||
int Integer = static_cast<int>(x);
|
||||
genType IntegerPart = static_cast<genType>(Integer);
|
||||
genType FractionalPart = fract(x);
|
||||
@ -229,10 +197,6 @@ namespace detail
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType ceil(genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::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<genType>::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<genType>::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<genType>::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<genType>::is_iec559 || std::numeric_limits<genType>::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<genType>::is_iec559 || std::numeric_limits<genType>::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<genType>::is_iec559 || std::numeric_limits<genType>::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<T>::is_iec559 || std::numeric_limits<T>::is_integer,
|
||||
"'clamp' only accept floating-point or integer inputs");
|
||||
|
||||
return detail::tvec2<T, P>(
|
||||
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<T>::is_iec559 || std::numeric_limits<T>::is_integer,
|
||||
"'clamp' only accept floating-point or integer inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
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<T>::is_iec559 || std::numeric_limits<T>::is_integer,
|
||||
"'clamp' only accept floating-point or integer inputs");
|
||||
|
||||
return detail::tvec4<T, P>(
|
||||
clamp(x.x, minVal, maxVal),
|
||||
clamp(x.y, minVal, maxVal),
|
||||
@ -440,10 +368,6 @@ namespace detail
|
||||
detail::tvec2<T, P> const & maxVal
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
|
||||
"'clamp' only accept floating-point or integer inputs");
|
||||
|
||||
return detail::tvec2<T, P>(
|
||||
clamp(x.x, minVal.x, maxVal.x),
|
||||
clamp(x.y, minVal.y, maxVal.y));
|
||||
@ -457,10 +381,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & maxVal
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
|
||||
"'clamp' only accept floating-point or integer inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
clamp(x.x, minVal.x, maxVal.x),
|
||||
clamp(x.y, minVal.y, maxVal.y),
|
||||
@ -475,10 +395,6 @@ namespace detail
|
||||
detail::tvec4<T, P> const & maxVal
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,
|
||||
"'clamp' only accept floating-point or integer inputs");
|
||||
|
||||
return detail::tvec4<T, P>(
|
||||
clamp(x.x, minVal.x, maxVal.x),
|
||||
clamp(x.y, minVal.y, maxVal.y),
|
||||
@ -537,10 +453,6 @@ namespace detail
|
||||
vecType<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'step' only accept floating-point inputs");
|
||||
|
||||
return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, vecType<T, P>(edge)));
|
||||
}
|
||||
|
||||
@ -553,10 +465,6 @@ namespace detail
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::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<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'smoothstep' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec2<T, P>(
|
||||
smoothstep(edge0, edge1, x.x),
|
||||
smoothstep(edge0, edge1, x.y));
|
||||
@ -586,10 +490,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'smoothstep' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
smoothstep(edge0, edge1, x.x),
|
||||
smoothstep(edge0, edge1, x.y),
|
||||
@ -604,10 +504,6 @@ namespace detail
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'smoothstep' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec4<T, P>(
|
||||
smoothstep(edge0, edge1, x.x),
|
||||
smoothstep(edge0, edge1, x.y),
|
||||
@ -623,10 +519,6 @@ namespace detail
|
||||
detail::tvec2<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'smoothstep' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec2<T, P>(
|
||||
smoothstep(edge0.x, edge1.x, x.x),
|
||||
smoothstep(edge0.y, edge1.y, x.y));
|
||||
@ -640,10 +532,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'smoothstep' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
smoothstep(edge0.x, edge1.x, x.x),
|
||||
smoothstep(edge0.y, edge1.y, x.y),
|
||||
@ -658,10 +546,6 @@ namespace detail
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'smoothstep' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec4<T, P>(
|
||||
smoothstep(edge0.x, edge1.x, x.x),
|
||||
smoothstep(edge0.y, edge1.y, x.y),
|
||||
@ -673,10 +557,6 @@ namespace detail
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER bool isnan(genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::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<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'isnan' only accept floating-point inputs");
|
||||
|
||||
return typename detail::tvec2<T, P>::bool_type(
|
||||
isnan(x.x),
|
||||
isnan(x.y));
|
||||
@ -713,10 +589,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'isnan' only accept floating-point inputs");
|
||||
|
||||
return typename detail::tvec3<T, P>::bool_type(
|
||||
isnan(x.x),
|
||||
isnan(x.y),
|
||||
@ -729,10 +601,6 @@ namespace detail
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'isnan' only accept floating-point inputs");
|
||||
|
||||
return typename detail::tvec4<T, P>::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<genType>::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<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'isinf' only accept floating-point inputs");
|
||||
|
||||
return typename detail::tvec2<T, P>::bool_type(
|
||||
isinf(x.x),
|
||||
isinf(x.y));
|
||||
@ -785,10 +645,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'isinf' only accept floating-point inputs");
|
||||
|
||||
return typename detail::tvec3<T, P>::bool_type(
|
||||
isinf(x.x),
|
||||
isinf(x.y),
|
||||
@ -801,10 +657,6 @@ namespace detail
|
||||
detail::tvec4<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'isinf' only accept floating-point inputs");
|
||||
|
||||
return typename detail::tvec4<T, P>::bool_type(
|
||||
isinf(x.x),
|
||||
isinf(x.y),
|
||||
@ -880,10 +732,6 @@ namespace detail
|
||||
int & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::is_iec559,
|
||||
"'frexp' only accept floating-point inputs");
|
||||
|
||||
return std::frexp(x, exp);
|
||||
}
|
||||
|
||||
@ -894,10 +742,6 @@ namespace detail
|
||||
detail::tvec2<int, P> & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'frexp' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec2<T, P>(
|
||||
frexp(x.x, exp.x),
|
||||
frexp(x.y, exp.y));
|
||||
@ -910,10 +754,6 @@ namespace detail
|
||||
detail::tvec3<int, P> & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'frexp' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
frexp(x.x, exp.x),
|
||||
frexp(x.y, exp.y),
|
||||
@ -927,10 +767,6 @@ namespace detail
|
||||
detail::tvec4<int, P> & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'frexp' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec4<T, P>(
|
||||
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<genType>::is_iec559,
|
||||
"'frexp' only accept floating-point inputs");
|
||||
|
||||
return std::ldexp(x, exp);
|
||||
}
|
||||
|
||||
@ -959,10 +791,6 @@ namespace detail
|
||||
detail::tvec2<int, P> const & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'ldexp' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec2<T, P>(
|
||||
ldexp(x.x, exp.x),
|
||||
ldexp(x.y, exp.y));
|
||||
@ -975,10 +803,6 @@ namespace detail
|
||||
detail::tvec3<int, P> const & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'ldexp' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
ldexp(x.x, exp.x),
|
||||
ldexp(x.y, exp.y),
|
||||
@ -992,10 +816,6 @@ namespace detail
|
||||
detail::tvec4<int, P> const & exp
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<T>::is_iec559,
|
||||
"'ldexp' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec4<T, P>(
|
||||
ldexp(x.x, exp.x),
|
||||
ldexp(x.y, exp.y),
|
||||
|
21
deps/glm/detail/func_exponential.inl
vendored
21
deps/glm/detail/func_exponential.inl
vendored
@ -85,10 +85,6 @@ namespace detail
|
||||
genType const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::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<genType>::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<genType>::is_iec559,
|
||||
"'log' only accept floating-point inputs");
|
||||
|
||||
return std::log(x);
|
||||
}
|
||||
|
||||
@ -130,10 +118,6 @@ namespace detail
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType exp2(genType const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(
|
||||
std::numeric_limits<genType>::is_iec559,
|
||||
"'exp2' only accept floating-point inputs");
|
||||
|
||||
return std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);
|
||||
}
|
||||
|
||||
@ -143,9 +127,6 @@ namespace detail
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType log2(genType x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,
|
||||
"GLM core 'log2' only accept floating-point inputs. Include <glm/gtx/integer.hpp> for additional integer support.");
|
||||
|
||||
assert(x > genType(0)); // log2 is only defined on the range (0, inf]
|
||||
return detail::compute_log2<std::numeric_limits<genType>::is_iec559>()(x);
|
||||
}
|
||||
@ -208,7 +189,6 @@ namespace detail
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sqrt' only accept floating-point inputs");
|
||||
return detail::compute_sqrt<vecType, T, P>::call(x);
|
||||
}
|
||||
|
||||
@ -229,7 +209,6 @@ namespace detail
|
||||
vecType<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inversesqrt' only accept floating-point inputs");
|
||||
return detail::compute_inversesqrt<vecType, T, P>::call(x);
|
||||
}
|
||||
|
||||
|
32
deps/glm/detail/func_geometric.inl
vendored
32
deps/glm/detail/func_geometric.inl
vendored
@ -85,8 +85,6 @@ namespace detail
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'length' only accept floating-point inputs");
|
||||
|
||||
genType sqr = x * x;
|
||||
return sqrt(sqr);
|
||||
}
|
||||
@ -94,8 +92,6 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T length(detail::tvec2<T, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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 <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T length(detail::tvec3<T, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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 <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER T length(detail::tvec4<T, P> const & v)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<genType>::is_iec559, "'distance' only accept floating-point inputs");
|
||||
|
||||
return length(p1 - p0);
|
||||
}
|
||||
|
||||
@ -138,8 +128,6 @@ namespace detail
|
||||
detail::tvec2<T, P> const & p1
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance' only accept floating-point inputs");
|
||||
|
||||
return length(p1 - p0);
|
||||
}
|
||||
|
||||
@ -150,8 +138,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & p1
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance' only accept floating-point inputs");
|
||||
|
||||
return length(p1 - p0);
|
||||
}
|
||||
|
||||
@ -162,8 +148,6 @@ namespace detail
|
||||
detail::tvec4<T, P> const & p1
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<T>::is_iec559, "'dot' only accept floating-point inputs");
|
||||
return detail::compute_dot<detail::tvec1, T, highp>::call(x, y);
|
||||
}
|
||||
|
||||
@ -186,7 +169,6 @@ namespace detail
|
||||
vecType<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' only accept floating-point inputs");
|
||||
return detail::compute_dot<vecType, T, P>::call(x, y);
|
||||
}
|
||||
|
||||
@ -215,8 +197,6 @@ namespace detail
|
||||
detail::tvec3<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' only accept floating-point inputs");
|
||||
|
||||
return detail::tvec3<T, P>(
|
||||
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<genType>::is_iec559, "'normalize' only accept floating-point inputs");
|
||||
|
||||
return x < genType(0) ? genType(-1) : genType(1);
|
||||
}
|
||||
|
||||
@ -242,8 +220,6 @@ namespace detail
|
||||
detail::tvec2<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<T, P> const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<genType>::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<T>::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))
|
||||
|
30
deps/glm/detail/func_trigonometric.inl
vendored
30
deps/glm/detail/func_trigonometric.inl
vendored
@ -39,8 +39,6 @@ namespace glm
|
||||
genType const & degrees
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::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<genType>::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<genType>::is_iec559, "'sin' only accept floating-point input");
|
||||
|
||||
return genType(::std::sin(angle));
|
||||
}
|
||||
|
||||
@ -78,8 +72,6 @@ namespace glm
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType cos(genType const & angle)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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));
|
||||
|
16
deps/glm/detail/func_vector_relational.inl
vendored
16
deps/glm/detail/func_vector_relational.inl
vendored
@ -37,10 +37,6 @@ namespace glm
|
||||
vecType<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::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, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(int i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] < y[i];
|
||||
@ -55,10 +51,6 @@ namespace glm
|
||||
vecType<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::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, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(int i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] <= y[i];
|
||||
@ -72,10 +64,6 @@ namespace glm
|
||||
vecType<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::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, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(int i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] > y[i];
|
||||
@ -89,10 +77,6 @@ namespace glm
|
||||
vecType<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::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, P>::bool_type Result(vecType<bool, P>::_null);
|
||||
for(int i = 0; i < x.length(); ++i)
|
||||
Result[i] = x[i] >= y[i];
|
||||
|
25
deps/glm/detail/type_mat4x4.inl
vendored
25
deps/glm/detail/type_mat4x4.inl
vendored
@ -178,26 +178,6 @@ namespace detail
|
||||
X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<X1>::is_iec559 || std::numeric_limits<X1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Y1>::is_iec559 || std::numeric_limits<Y1>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Z1>::is_iec559 || std::numeric_limits<Z1>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<W1>::is_iec559 || std::numeric_limits<W1>::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.");
|
||||
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<X2>::is_iec559 || std::numeric_limits<X2>::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Y2>::is_iec559 || std::numeric_limits<Y2>::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Z2>::is_iec559 || std::numeric_limits<Z2>::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<W2>::is_iec559 || std::numeric_limits<W2>::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid.");
|
||||
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<X3>::is_iec559 || std::numeric_limits<X3>::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Y3>::is_iec559 || std::numeric_limits<Y3>::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Z3>::is_iec559 || std::numeric_limits<Z3>::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<W3>::is_iec559 || std::numeric_limits<W3>::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid.");
|
||||
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<X4>::is_iec559 || std::numeric_limits<X4>::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Y4>::is_iec559 || std::numeric_limits<Y4>::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<Z4>::is_iec559 || std::numeric_limits<Z4>::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<W4>::is_iec559 || std::numeric_limits<W4>::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.");
|
||||
|
||||
this->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));
|
||||
this->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));
|
||||
this->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));
|
||||
@ -214,11 +194,6 @@ namespace detail
|
||||
tvec4<V4, P> const & v4
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<V2>::is_iec559 || std::numeric_limits<V2>::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<V3>::is_iec559 || std::numeric_limits<V3>::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.");
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<V4>::is_iec559 || std::numeric_limits<V4>::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);
|
||||
|
24
deps/glm/gtc/reciprocal.inl
vendored
24
deps/glm/gtc/reciprocal.inl
vendored
@ -38,8 +38,6 @@ namespace glm
|
||||
genType const & angle
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::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<genType>::is_iec559, "'acoth' only accept floating-point values");
|
||||
|
||||
return atanh(genType(1) / x);
|
||||
}
|
||||
|
||||
|
6
deps/glm/gtx/bit.inl
vendored
6
deps/glm/gtx/bit.inl
vendored
@ -167,8 +167,6 @@ namespace glm
|
||||
template <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType bitRevert(genType const & In)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::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 <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::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 <typename genType>
|
||||
GLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, "'bitRotateLeft' only accept integer values");
|
||||
|
||||
std::size_t BitSize = sizeof(genType) * 8;
|
||||
return (In >> Shift) | (In << (BitSize - Shift));
|
||||
}
|
||||
|
2
deps/glm/gtx/fast_square_root.inl
vendored
2
deps/glm/gtx/fast_square_root.inl
vendored
@ -16,8 +16,6 @@ namespace glm
|
||||
genType const & x
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fastSqrt' only accept floating-point input");
|
||||
|
||||
return genType(1) / fastInverseSqrt(x);
|
||||
}
|
||||
|
||||
|
8
deps/glm/gtx/vector_angle.inl
vendored
8
deps/glm/gtx/vector_angle.inl
vendored
@ -16,8 +16,6 @@ namespace glm
|
||||
genType const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::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<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<T, P> const & y
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<T, P> const & ref
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'orientedAngle' only accept floating-point inputs");
|
||||
|
||||
T const Dot = clamp(dot(x, y), T(-1), T(1));
|
||||
|
||||
#ifdef GLM_FORCE_RADIANS
|
||||
|
10
deps/glm/gtx/vector_query.inl
vendored
10
deps/glm/gtx/vector_query.inl
vendored
@ -94,8 +94,6 @@ namespace detail
|
||||
T const & epsilon
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areCollinear' only accept floating-point inputs");
|
||||
|
||||
return detail::compute_areCollinear<T, P, vecType>::call(v0, v1, epsilon);
|
||||
}
|
||||
|
||||
@ -107,8 +105,6 @@ namespace detail
|
||||
T const & epsilon
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'areOrthogonal' only accept floating-point inputs");
|
||||
|
||||
return abs(dot(v0, v1)) <= max(
|
||||
static_cast<T>(1),
|
||||
length(v0)) * max(static_cast<T>(1), length(v1)) * epsilon;
|
||||
@ -121,8 +117,6 @@ namespace detail
|
||||
T const & epsilon
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isNormalized' only accept floating-point inputs");
|
||||
|
||||
return abs(length(v) - static_cast<T>(1)) <= static_cast<T>(2) * epsilon;
|
||||
}
|
||||
|
||||
@ -133,8 +127,6 @@ namespace detail
|
||||
T const & epsilon
|
||||
)
|
||||
{
|
||||
GLM_STATIC_ASSERT(std::numeric_limits<T>::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<T>::is_iec559, "'isCompNull' only accept floating-point inputs");
|
||||
|
||||
return detail::compute_isCompNull<T, P, vecType>::call(v, epsilon);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user