diff --git a/Sming/Core/Data/Range.h b/Sming/Core/Data/Range.h index 92168a7c5d..c0f88c68da 100644 --- a/Sming/Core/Data/Range.h +++ b/Sming/Core/Data/Range.h @@ -87,6 +87,14 @@ template struct TRange { return (value >= min) && (value <= max); } + /** + * @brief Determine if range contains another range (subset) + */ + template bool contains(const TRange& value) const + { + return contains(value.min) && contains(value.max); + } + /** * @brief Clip values to within the range */