TaggedInterval.opBinary

Returns true iff this is a subset of other, ie. fully included _in_.

  1. TaggedInterval opBinary(in TaggedInterval other)
  2. Region opBinary(in TaggedInterval other)
  3. bool opBinary(in TaggedInterval other)
    struct TaggedInterval
    bool
    opBinary
    const pure nothrow
    (
    string op
    )
    if (
    op == "in"
    )

Examples

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

Meta