Example #1
0
 public bool IsOverlap(IntRange range)
 {
     return(range.End >= Begin || range.Begin <= End);
 }
Example #2
0
        public IntRange Adjust(IntRange bounds)
        {
            var begin = Math.Max(Math.Min(End, bounds.End) - Length, bounds.Begin);

            return(new IntRange(begin, begin + Math.Min(Length, bounds.Length)));
        }
Example #3
0
 public bool IsInclude(IntRange range)
 {
     return(range.Begin >= Begin && range.End <= End);
 }
Example #4
0
 public bool Equals(IntRange other)
 {
     return(Begin == other.Begin && End == other.End);
 }