public static Rectangle union(Rectangle first, Rectangle second) {
		boolean firstEmpty = first.width < 1 || first.height < 1;
		boolean secondEmpty = second.width < 1 || second.height < 1;
		if (firstEmpty && secondEmpty) {
			return new Rectangle();
		}
		if (firstEmpty) {
			return new Rectangle(second);
		}
		if (secondEmpty) {
			return new Rectangle(first);
		}
		return first.union(second);
	}