Tentative fix build
This commit is contained in:
parent
710e95fb08
commit
2098b073ff
@ -8,7 +8,7 @@
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T, bool isFloat = std::numeric_limits<T>::is_iec559>
|
||||
template <typename T, bool isFloat>
|
||||
struct compute_equal
|
||||
{
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 static bool call(T a, T b)
|
||||
|
@ -57,7 +57,7 @@ namespace glm
|
||||
|
||||
vec<L, bool, Q> Result;
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = detail::compute_equal<T>::call(x[i], y[i]);
|
||||
Result[i] = detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x[i], y[i]);
|
||||
return Result;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ namespace glm
|
||||
|
||||
vec<L, bool, Q> Result;
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = !detail::compute_equal<T>::call(x[i], y[i]);
|
||||
Result[i] = !detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x[i], y[i]);
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
/// @ref core
|
||||
/// @file glm/detail/type_vec1.inl
|
||||
|
||||
#include "./compute_vector_relational.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
// -- Implicit basic constructors --
|
||||
@ -531,7 +529,7 @@ namespace glm
|
||||
template<typename T, qualifier Q>
|
||||
GLM_FUNC_QUALIFIER bool operator==(vec<1, T, Q> const& v1, vec<1, T, Q> const& v2)
|
||||
{
|
||||
return detail::compute_equal<T>::call(v1.x, v2.x);
|
||||
return detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -1,8 +1,6 @@
|
||||
/// @ref core
|
||||
/// @file glm/core/type_tvec2.inl
|
||||
|
||||
#include "./compute_vector_relational.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
// -- Implicit basic constructors --
|
||||
@ -876,8 +874,8 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER bool operator==(vec<2, T, Q> const& v1, vec<2, T, Q> const& v2)
|
||||
{
|
||||
return
|
||||
detail::compute_equal<T>::call(v1.x, v2.x) &&
|
||||
detail::compute_equal<T>::call(v1.y, v2.y);
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x) &&
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.y, v2.y);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -1,8 +1,6 @@
|
||||
/// @ref core
|
||||
/// @file glm/detail/type_tvec3.inl
|
||||
|
||||
#include "./compute_vector_relational.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
// -- Implicit basic constructors --
|
||||
@ -1026,9 +1024,9 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 bool operator==(vec<3, T, Q> const& v1, vec<3, T, Q> const& v2)
|
||||
{
|
||||
return
|
||||
detail::compute_equal<T>::call(v1.x, v2.x) &&
|
||||
detail::compute_equal<T>::call(v1.y, v2.y) &&
|
||||
detail::compute_equal<T>::call(v1.z, v2.z);
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x) &&
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.y, v2.y) &&
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.z, v2.z);
|
||||
}
|
||||
|
||||
template<typename T, qualifier Q>
|
||||
|
@ -1,8 +1,6 @@
|
||||
/// @ref core
|
||||
/// @file glm/detail/type_tvec4.inl
|
||||
|
||||
#include "./compute_vector_relational.hpp"
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
@ -132,10 +130,10 @@ namespace detail
|
||||
GLM_FUNC_QUALIFIER static bool call(vec<4, T, Q> const& v1, vec<4, T, Q> const& v2)
|
||||
{
|
||||
return
|
||||
detail::compute_equal<T>::call(v1.x, v2.x) &&
|
||||
detail::compute_equal<T>::call(v1.y, v2.y) &&
|
||||
detail::compute_equal<T>::call(v1.z, v2.z) &&
|
||||
detail::compute_equal<T>::call(v1.w, v2.w);
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x) &&
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.y, v2.y) &&
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.z, v2.z) &&
|
||||
detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.w, v2.w);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -620,7 +620,7 @@ namespace detail
|
||||
|
||||
float const ExpSharedP = max(-15.f - 1.f, floor(log2(MaxColor))) + 1.0f + 15.f;
|
||||
float const MaxShared = floor(MaxColor / pow(2.0f, (ExpSharedP - 15.f - 9.f)) + 0.5f);
|
||||
float const ExpShared = detail::compute_equal<float>::call(MaxShared, pow(2.0f, 9.0f)) ? ExpSharedP + 1.0f : ExpSharedP;
|
||||
float const ExpShared = detail::compute_equal<float, std::numeric_limits<float>::is_iec559>::call(MaxShared, pow(2.0f, 9.0f)) ? ExpSharedP + 1.0f : ExpSharedP;
|
||||
|
||||
uvec3 const ColorComp(floor(Color / pow(2.f, (ExpShared - 15.f - 9.f)) + 0.5f));
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include "../trigonometric.hpp"
|
||||
#include "../geometric.hpp"
|
||||
#include "../exponential.hpp"
|
||||
#include "../detail/compute_vector_relational.hpp"
|
||||
#include "epsilon.hpp"
|
||||
#include <limits>
|
||||
|
||||
@ -603,7 +602,7 @@ namespace detail
|
||||
const T y = static_cast<T>(2) * (q.y * q.z + q.w * q.x);
|
||||
const T x = q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z;
|
||||
|
||||
if(detail::compute_equal<T>::call(y, static_cast<T>(0)) && detail::compute_equal<T>::call(x, static_cast<T>(0))) //avoid atan2(0,0) - handle singularity - Matiis
|
||||
if(detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(y, static_cast<T>(0)) && detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x, static_cast<T>(0))) //avoid atan2(0,0) - handle singularity - Matiis
|
||||
return static_cast<T>(static_cast<T>(2) * atan(q.x,q.w));
|
||||
|
||||
return static_cast<T>(atan(y,x));
|
||||
@ -772,7 +771,7 @@ namespace detail
|
||||
{
|
||||
vec<4, bool, Q> Result;
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = detail::compute_equal<T>::call(x[i], y[i]);
|
||||
Result[i] = detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x[i], y[i]);
|
||||
return Result;
|
||||
}
|
||||
|
||||
@ -781,7 +780,7 @@ namespace detail
|
||||
{
|
||||
vec<4, bool, Q> Result;
|
||||
for(length_t i = 0; i < x.length(); ++i)
|
||||
Result[i] = !detail::compute_equal<T>::call(x[i], y[i]);
|
||||
Result[i] = !detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x[i], y[i]);
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -82,13 +82,13 @@ namespace detail
|
||||
if((ix>0x7f800000) || // x is nan
|
||||
(iy>0x7f800000)) // y is nan
|
||||
return x+y;
|
||||
if(compute_equal<float>::call(x, y))
|
||||
if(compute_equal<float, std::numeric_limits<float>::is_iec559>::call(x, y))
|
||||
return y; // x=y, return y
|
||||
if(ix==0)
|
||||
{ // x == 0
|
||||
GLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal
|
||||
t = x*x;
|
||||
if(detail::compute_equal<float>::call(t, x))
|
||||
if(detail::compute_equal<float, true>::call(t, x))
|
||||
return t;
|
||||
else
|
||||
return x; // raise underflow flag
|
||||
@ -113,7 +113,7 @@ namespace detail
|
||||
if(hy<0x00800000) // underflow
|
||||
{
|
||||
t = x*x;
|
||||
if(!detail::compute_equal<float>::call(t, x))
|
||||
if(!detail::compute_equal<float, true>::call(t, x))
|
||||
{ // raise underflow flag
|
||||
GLM_SET_FLOAT_WORD(y,hx);
|
||||
return y;
|
||||
@ -137,13 +137,13 @@ namespace detail
|
||||
if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan
|
||||
((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan
|
||||
return x+y;
|
||||
if(detail::compute_equal<double>::call(x, y))
|
||||
if(detail::compute_equal<double, true>::call(x, y))
|
||||
return y; // x=y, return y
|
||||
if((ix|lx)==0)
|
||||
{ // x == 0
|
||||
GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal
|
||||
t = x*x;
|
||||
if(detail::compute_equal<double>::call(t, x))
|
||||
if(detail::compute_equal<double, true>::call(t, x))
|
||||
return t;
|
||||
else
|
||||
return x; // raise underflow flag
|
||||
@ -171,7 +171,7 @@ namespace detail
|
||||
if(hy<0x00100000)
|
||||
{ // underflow
|
||||
t = x*x;
|
||||
if(!detail::compute_equal<double>::call(t, x))
|
||||
if(!detail::compute_equal<double, true>::call(t, x))
|
||||
{ // raise underflow flag
|
||||
GLM_INSERT_WORDS(y,hx,lx);
|
||||
return y;
|
||||
|
@ -6,7 +6,6 @@ namespace glm
|
||||
template<typename genType>
|
||||
GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base)
|
||||
{
|
||||
assert(!detail::compute_equal<genType>::call(x, static_cast<genType>(0)));
|
||||
return glm::log(x) / glm::log(base);
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace glm
|
||||
T const& y
|
||||
)
|
||||
{
|
||||
return detail::compute_equal<T>::call(x, y);
|
||||
return detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x, y);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@ -60,7 +60,7 @@ namespace glm
|
||||
T const& y
|
||||
)
|
||||
{
|
||||
return !detail::compute_equal<T>::call(x, y);
|
||||
return !detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(x, y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool any
|
||||
|
Loading…
Reference in New Issue
Block a user