コード例 #1
0
 public static IsoMinMax Merge(IsoMinMax a, IsoMinMax b)
 {
     if (a.min > b.min)
     {
         a.min = b.min;
     }
     if (a.max < b.max)
     {
         a.max = b.max;
     }
     return(a);
 }
コード例 #2
0
 public bool Approximately(IsoMinMax other)
 {
     return
         (Mathf.Approximately(min, other.min) &&
          Mathf.Approximately(max, other.max));
 }
コード例 #3
0
 public bool Contains(IsoMinMax other)
 {
     return
         (max >= other.max &&
          min <= other.min);
 }
コード例 #4
0
 public bool Overlaps(IsoMinMax other)
 {
     return
         (max > other.min &&
          min < other.max);
 }
コード例 #5
0
 public void Set(IsoMinMax other)
 {
     min = other.min;
     max = other.max;
 }
コード例 #6
0
 public IsoMinMax(IsoMinMax other) : this()
 {
     min = other.min;
     max = other.max;
 }
コード例 #7
0
 public void Set(IsoMinMax minmax_x, IsoMinMax minmax_y)
 {
     x.Set(minmax_x);
     y.Set(minmax_y);
 }
コード例 #8
0
 public IsoRect(IsoMinMax minmax_x, IsoMinMax minmax_y) : this()
 {
     x.Set(minmax_x);
     y.Set(minmax_y);
 }
コード例 #9
0
 public static IsoRect Merge(IsoRect a, IsoRect b)
 {
     a.x = IsoMinMax.Merge(a.x, b.x);
     a.y = IsoMinMax.Merge(a.y, b.y);
     return(a);
 }