// Gets the minimum intersection outHeight, and leftmost point public int IntersectingWidth(Bounding rhs, out int outWidth) { if (InsideHoriz(rhs)) { // If completely inside RHS outWidth = Width; return(XMin); } if (rhs.InsideHoriz(this)) { // If completely containing RHS outWidth = rhs.Width; return(rhs.XMin); } return(GetMinDim(rhs.XMax - XMin, XMax - rhs.XMin, out outWidth) ? XMin : rhs.XMin); }