The OpenD Programming Language

NegInfInterval.intersection

Returns the intersection of two intervals

  1. Interval!TP intersection(Interval!TP interval)
  2. Interval!TP intersection(PosInfInterval!TP interval)
  3. NegInfInterval intersection(NegInfInterval interval)
    struct NegInfInterval(TP)
    const nothrow
    intersection
    ()

Parameters

interval NegInfInterval

The interval to intersect with this interval.

Examples

assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
            NegInfInterval!Date(Date(1999, 7, 6))) ==
       NegInfInterval!Date(Date(1999, 7 , 6)));

assert(NegInfInterval!Date(Date(2012, 3, 1)).intersection(
            NegInfInterval!Date(Date(2013, 1, 12))) ==
       NegInfInterval!Date(Date(2012, 3 , 1)));

Meta