mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-04 04:05:19 +08:00
Here is the proper fix.
This commit is contained in:
parent
13ce92f5ba
commit
ae0a17d30b
@ -321,15 +321,15 @@ template<> inline bool ei_random()
|
|||||||
{
|
{
|
||||||
return (ei_random<int>(0,1) == 1);
|
return (ei_random<int>(0,1) == 1);
|
||||||
}
|
}
|
||||||
inline bool ei_isMuchSmallerThan(bool a, bool, bool = false/*NumTraits<bool>::dummy_precision()*/)
|
inline bool ei_isMuchSmallerThan(bool a, bool, bool = NumTraits<bool>::dummy_precision())
|
||||||
{
|
{
|
||||||
return !a;
|
return !a;
|
||||||
}
|
}
|
||||||
inline bool ei_isApprox(bool a, bool b, bool = false/*NumTraits<bool>::dummy_precision()*/)
|
inline bool ei_isApprox(bool a, bool b, bool = NumTraits<bool>::dummy_precision())
|
||||||
{
|
{
|
||||||
return a == b;
|
return a == b;
|
||||||
}
|
}
|
||||||
inline bool ei_isApproxOrLessThan(bool a, bool b, bool = false/*NumTraits<bool>::dummy_precision()*/)
|
inline bool ei_isApproxOrLessThan(bool a, bool b, bool = NumTraits<bool>::dummy_precision())
|
||||||
{
|
{
|
||||||
return int(a) <= int(b);
|
return int(a) <= int(b);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ template<typename T> struct ei_default_float_numtraits
|
|||||||
template<typename T> struct ei_default_integral_numtraits
|
template<typename T> struct ei_default_integral_numtraits
|
||||||
: std::numeric_limits<T>
|
: std::numeric_limits<T>
|
||||||
{
|
{
|
||||||
inline static int dummy_precision() { return 0; }
|
inline static T dummy_precision() { return T(0); }
|
||||||
inline static T highest() { return std::numeric_limits<T>::max(); }
|
inline static T highest() { return std::numeric_limits<T>::max(); }
|
||||||
inline static T lowest() { return std::numeric_limits<T>::min(); }
|
inline static T lowest() { return std::numeric_limits<T>::min(); }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user