34 const bool thisLowerInfinite = !std::isfinite( mMin );
35 const bool thisUpperInfinite = !std::isfinite( mMax );
38 const bool otherLowerInfinite = !std::isfinite( other.mMin );
39 const bool otherUpperInfinite = !std::isfinite( other.mMax );
41 if ( ( ( thisIncludesLower && otherIncludesLower && ( mMin <= other.mMin || thisLowerInfinite ) ) || ( ( !thisIncludesLower || !otherIncludesLower ) && ( mMin < other.mMin || thisLowerInfinite ) ) )
42 && ( ( thisIncludesUpper && otherIncludesUpper && ( mMax >= other.mMax || thisUpperInfinite ) ) || ( ( !thisIncludesUpper || !otherIncludesUpper ) && ( mMax > other.mMax || thisUpperInfinite ) ) ) )
45 if ( ( ( otherIncludesLower && ( mMin <= other.mMin || thisLowerInfinite ) ) || ( !otherIncludesLower && ( mMin < other.mMin || thisLowerInfinite ) ) )
46 && ( ( thisIncludesUpper && otherIncludesLower && ( mMax >= other.mMin || thisUpperInfinite ) ) || ( ( !thisIncludesUpper || !otherIncludesLower ) && ( mMax > other.mMin || thisUpperInfinite ) ) ) )
49 if ( ( ( thisIncludesLower && otherIncludesUpper && ( mMin <= other.mMax || thisLowerInfinite ) ) || ( ( !thisIncludesLower || !otherIncludesUpper ) && ( mMin < other.mMax || thisLowerInfinite ) ) )
50 && ( ( thisIncludesUpper && otherIncludesUpper && ( mMax >= other.mMax || thisUpperInfinite ) ) || ( ( !thisIncludesUpper || !otherIncludesUpper ) && ( mMax > other.mMax || thisUpperInfinite ) ) ) )
53 if ( ( ( thisIncludesLower && otherIncludesLower && ( mMin >= other.mMin || otherLowerInfinite ) ) || ( ( !thisIncludesLower || !otherIncludesLower ) && ( mMin > other.mMin || otherLowerInfinite ) ) )
54 && ( ( thisIncludesLower && otherIncludesUpper && ( mMin <= other.mMax || thisLowerInfinite || otherUpperInfinite ) ) || ( ( !thisIncludesLower || !otherIncludesUpper ) && ( mMin < other.mMax || thisLowerInfinite || otherUpperInfinite ) ) ) )
65 const QString minText = std::isnan( mMin ) ? u
"-%1"_s.arg( QChar( 0x221e ) ) : QString::number( mMin );
66 const QString maxText = std::isnan( mMax ) ? QChar( 0x221e ) : QString::number( mMax );
70 return u
"%1 %2 x %3 %4"_s.arg( minText, operator1, operator2, maxText );
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference).