Example #1
0
 /// <summary>
 /// Enumerates all points in range excluding other range
 /// </summary>
 /// <param name="range"></param>
 /// <param name="exclude"></param>
 /// <returns></returns>
 public static IEnumerable <Vector2I> AllExclude(Range2I range, Range2I exclude)
 {
     if (range == exclude)
     {
         return(null);
     }
     return(range.Where(pos => !exclude.Contains(pos)));
 }
Example #2
0
 public bool Equals(Range2I other)
 {
     return(other.Position.Equals(Position) && other.Size.Equals(Size));
 }
Example #3
0
 /// <summary>
 /// Enumerates all points in range excluding range specified
 /// </summary>
 /// <param name="exclude"></param>
 /// <returns></returns>
 public IEnumerable <Vector2I> AllExclude(Range2I exclude)
 {
     return(AllExclude(this, exclude));
 }