TaggedInterval.intersects

Returns true iff the tagged intervals intersect.

struct TaggedInterval
bool
intersects
const pure nothrow

Examples

1 alias R = Region!(int, int);
2 alias TI = R.TaggedInterval;
3 
4 assert(!TI(0, 10, 20).intersects(TI(0, 0, 5)));
5 assert(TI(0, 10, 20).intersects(TI(0, 5, 15)));
6 assert(TI(0, 10, 20).intersects(TI(0, 12, 18)));
7 assert(TI(0, 10, 20).intersects(TI(0, 15, 25)));
8 assert(TI(0, 10, 20).intersects(TI(0, 10, 20)));
9 assert(!TI(0, 10, 20).intersects(TI(0, 25, 30)));
10 assert(!TI(0, 10, 20).intersects(TI(1, 25, 30)));

Meta