mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6941 Use std::limits<double>::max() instead of HUGE_VAL for histogram data.
This commit is contained in:
parent
95f6626480
commit
7120b9ad7e
@ -18,18 +18,18 @@
|
|||||||
|
|
||||||
#include "RimHistogramData.h"
|
#include "RimHistogramData.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <limits>
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimHistogramData::RimHistogramData()
|
RimHistogramData::RimHistogramData()
|
||||||
: min( HUGE_VAL )
|
: min( std::numeric_limits<double>::max() )
|
||||||
, max( HUGE_VAL )
|
, max( std::numeric_limits<double>::max() )
|
||||||
, p10( HUGE_VAL )
|
, p10( std::numeric_limits<double>::max() )
|
||||||
, p90( HUGE_VAL )
|
, p90( std::numeric_limits<double>::max() )
|
||||||
, mean( HUGE_VAL )
|
, mean( std::numeric_limits<double>::max() )
|
||||||
, weightedMean( HUGE_VAL )
|
, weightedMean( std::numeric_limits<double>::max() )
|
||||||
, sum( 0.0 )
|
, sum( 0.0 )
|
||||||
, histogram( nullptr )
|
, histogram( nullptr )
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ bool RimHistogramData::isMinMaxValid() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimHistogramData::isValid( double parameter ) const
|
bool RimHistogramData::isValid( double parameter ) const
|
||||||
{
|
{
|
||||||
return parameter != HUGE_VAL && parameter != -HUGE_VAL;
|
return parameter != std::numeric_limits<double>::max() && parameter != -std::numeric_limits<double>::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user