Only got to 2:19:41 so you may have fixed this later (will catch up with the videos over the next few days!), but I think the neater way to phrase the comparisons of aspect ratios would be to start with something like: max(x1, y1)/min(x1, y1)
A further thought on the algorithm: I don't think you want to set horizontal to !horizontal when you accept a group - the choice of which direction to try and lay out the next group should be based on the aspect ratio of free_size i.e. similar to the initial choice of direction for the root; you want to start the new group with a single rectangle which has one edge which is the shorter edge of the free_size
@@boxingexpert9065 Honestly i have no clue, but i know there's _some_ way to be enlisted for the beta already. Randy, another YT game dev got access to it too.