region: change MAX to finite numbers
some algorithms react badly to unexpected infinities. using finite numbers can aleviate this for some problem cases.
This commit is contained in:
parent
f7f84ef6b8
commit
1c7a92ee48
11
region.cpp
11
region.cpp
@ -307,15 +307,16 @@ namespace util {
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
///----------------------------------------------------------------------------
|
||||
/// The largest specifiable finite region. Specifically does not allow infinities.
|
||||
template <typename T>
|
||||
const util::region<T>
|
||||
util::region<T>::MAX (std::numeric_limits<T>::lowest (),
|
||||
util::region<T>::MAX (
|
||||
std::numeric_limits<T>::lowest (),
|
||||
std::numeric_limits<T>::lowest (),
|
||||
std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity () :
|
||||
std::numeric_limits<T>::max (),
|
||||
std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity () :
|
||||
std::numeric_limits<T>::max ());
|
||||
std::numeric_limits<T>::max ()
|
||||
);
|
||||
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user