Exemple #1
0
 public FloatRange IntersectionWith(FloatRange other) =>
 IsEmpty || other.IsEmpty
         ? Empty
         : new FloatRange(Start.Max(other.Start), End.Min(other.End));
Exemple #2
0
 public bool Equals(FloatRange other) =>
 Start.IsAlmostEqualTo(other.Start) &&
 End.IsAlmostEqualTo(other.End);
Exemple #3
0
 public bool IntersectsWith(FloatRange other) =>
 !IsEmpty && !other.IsEmpty &&
 (Start <= other.Start && End >= other.End ||
  Start >= other.Start && Start <other.End ||
                                 End> other.Start && End <= other.End);