Region.opBinary

Undocumented in source. Be warned that the author may not have intended to support it.
  1. Region opBinary(Region other)
  2. Region opBinary(TaggedInterval other)
  3. Region opBinary(Region other)
  4. Region opBinary(TaggedInterval other)
  5. Region opBinary(TaggedInterval interval)
  6. Region opBinary(Region other)
    struct Region(Number, Tag, string tagAlias = null, Tag emptyTag = Tag.init)
    const
    opBinary
    (
    string op
    )
    if (
    op == "-"
    )

Examples

alias R = Region!(int, int);
alias TI = R.TaggedInterval;

assert((R(0, 10, 20) - R(0, 0, 5)) == R(0, 10, 20));
assert((R(0, 10, 20) - R(0, 5, 15)) == R(0, 15, 20));
assert((R(0, 10, 20) - R(0, 12, 18)) == R([TI(0, 10, 12), TI(0, 18, 20)]));
assert((R(0, 10, 20) - R(0, 10, 20)).empty);
assert((R(0, 10, 20) - R(0, 15, 25)) == R(0, 10, 15));
assert((R(0, 10, 20) - R(0, 25, 30)) == R(0, 10, 20));
assert((R(0, 10, 20) - R(1, 25, 30)) == R(0, 10, 20));

Meta