Use std::numeric_limits for double max

pull/2779/head
Cory Fabre 2019-11-22 10:56:31 -06:00
parent 36ca37f9ac
commit 136996e1f6
2 changed files with 6 additions and 4 deletions

View File

@ -58,6 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Header files, standard library.
#include <memory>
#include <limits>
#include <inttypes.h>
#ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
@ -181,8 +182,8 @@ void SetAccessorRange(Ref<Accessor> acc, void* data, unsigned int count,
// Allocate and initialize with large values.
for (unsigned int i = 0 ; i < numCompsOut ; i++) {
acc->min.push_back(DBL_MAX);
acc->max.push_back(DBL_MIN);
acc->min.push_back( std::numeric_limits<double>::max());
acc->max.push_back(-std::numeric_limits<double>::max());
}
size_t totalComps = count * numCompsIn;

View File

@ -58,6 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Header files, standard library.
#include <memory>
#include <limits>
#include <inttypes.h>
using namespace rapidjson;
@ -160,8 +161,8 @@ void SetAccessorRange(Ref<Accessor> acc, void* data, size_t count,
// Allocate and initialize with large values.
for (unsigned int i = 0 ; i < numCompsOut ; i++) {
acc->min.push_back(DBL_MAX);
acc->max.push_back(DBL_MIN);
acc->min.push_back( std::numeric_limits<double>::max());
acc->max.push_back(-std::numeric_limits<double>::max());
}
size_t totalComps = count * numCompsIn;