--- libgig/trunk/src/DLS.h 2014/05/10 17:13:52 2546 +++ libgig/trunk/src/DLS.h 2014/05/13 11:17:24 2547 @@ -214,6 +214,15 @@ inline bool operator== (const range_t& other) const { return low == other.low && high == other.high; } + + inline bool overlaps(uint16_t scalar) const { + return low <= scalar && scalar <= high; + } + + inline bool overlaps(const range_t& other) const { + return overlaps(other.low) || overlaps(other.high) || + other.overlaps(low) || other.overlaps(high); + } }; /** Defines Sample Loop Points. */