Fixed warnings
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "../geometric.hpp"
|
||||
#include "../exponential.hpp"
|
||||
#include "../detail/compute_vector_relational.hpp"
|
||||
#include "epsilon.hpp"
|
||||
#include <limits>
|
||||
|
||||
namespace glm{
|
||||
@@ -352,13 +353,13 @@ namespace detail
|
||||
template<typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator==(tquat<T, P> const & q1, tquat<T, P> const & q2)
|
||||
{
|
||||
return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w);
|
||||
return all(epsilonEqual(q1, q2, epsilon<T>()));
|
||||
}
|
||||
|
||||
template<typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER bool operator!=(tquat<T, P> const & q1, tquat<T, P> const & q2)
|
||||
{
|
||||
return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w);
|
||||
return any(epsilonNotEqual(q1, q2, epsilon<T>()));
|
||||
}
|
||||
|
||||
// -- Operations --
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
/// @file glm/gtx/common.inl
|
||||
|
||||
#include <cmath>
|
||||
#include "../gtc/epsilon.hpp"
|
||||
#include "../gtc/constants.hpp"
|
||||
|
||||
namespace glm{
|
||||
namespace detail
|
||||
@@ -33,7 +35,7 @@ namespace detail
|
||||
# if GLM_HAS_CXX11_STL
|
||||
return std::fpclassify(x) == FP_SUBNORMAL;
|
||||
# else
|
||||
return x != static_cast<T>(0) && std::fabs(x) < std::numeric_limits<T>::min();
|
||||
return epsilonNotEqual(x, static_cast<T>(0), epsilon<T>()) && std::fabs(x) < std::numeric_limits<T>::min();
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace glm
|
||||
template<typename genType>
|
||||
GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base)
|
||||
{
|
||||
assert(x != genType(0));
|
||||
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 x == y;
|
||||
return detail::compute_equal<T>::call(x, y);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
@@ -60,7 +60,7 @@ namespace glm
|
||||
T const & y
|
||||
)
|
||||
{
|
||||
return x != y;
|
||||
return !detail::compute_equal<T>::call(x, y);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER bool any
|
||||
|
||||
Reference in New Issue
Block a user