static public RectF2 GetConstrainedBelowX(this RectF2 item, float x) { if (item.GetRight() > x) { return(item.GetHorizontallyShifted(x - item.GetRight())); } return(item); }
static public RectF2 GetConstrainedAboveX(this RectF2 item, float x) { if (item.GetLeft() < x) { return(item.GetHorizontallyShifted(x - item.GetLeft())); } return(item); }