|
@ -9,13 +9,12 @@ public: |
|
|
unsigned min; |
|
|
unsigned min; |
|
|
unsigned max; |
|
|
unsigned max; |
|
|
|
|
|
|
|
|
bool contains(const Range &in) { |
|
|
bool contains(const Range &in) const { |
|
|
return min <= in.min && max >= in.max; |
|
|
return min <= in.min && max >= in.max; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool overlaps(const Range &in) { |
|
|
bool overlaps(const Range &in) const { |
|
|
return (min <= in.min && in.min <= max) |
|
|
return min <= in.max && in.min <= max; |
|
|
|| (in.min <= min && min <= in.max); |
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|