/// <summary> /// Determines whether there is overlap between this bounding box and another /// </summary> /// <param name="other">A bounding box</param> /// <returns>True if the bounding boxes overlap, otherwise false</returns> public bool IsIntersection(BBox2D other) { if (XMax < other.XMin || other.XMax < XMin) { return(false); } if (YMax < other.YMin || other.YMax < YMin) { return(false); } return(true); }
public bool Equals(BBox2D other) { return((XMin == other.XMin) && (XMax == other.XMax) && (YMin == other.YMin) && (YMax == other.YMax)); }