diff --git a/ApplicationCode/Application/Tools/RiaInterpolationTools.cpp b/ApplicationCode/Application/Tools/RiaInterpolationTools.cpp index 3a72babc07..6b8bb86f55 100644 --- a/ApplicationCode/Application/Tools/RiaInterpolationTools.cpp +++ b/ApplicationCode/Application/Tools/RiaInterpolationTools.cpp @@ -33,7 +33,7 @@ bool almostEqual( double a, double b, double maxRelDiff = std::numeric_limits fabsa ) ? fabsb : fabsa; + double largest = ( fabsb > fabsa ) ? fabsb : fabsa; return ( diff <= largest * maxRelDiff ); } @@ -194,7 +194,7 @@ void RiaInterpolationTools::interpolateMissingValues( const std::vector& { // The last value is inf: extrapolate from two last data points int prevSetIndex2 = findPreviousDataPoint( y, prevSetIndex - 1 ); - index = extrapolateRange( index, y.size(), prevSetIndex2, prevSetIndex, x, y ); + index = extrapolateRange( index, (int) y.size(), prevSetIndex2, prevSetIndex, x, y ); } else if ( nextSetIndex != static_cast( y.size() ) ) {