One thing that might be helpful here is that log(max(x/y, y/x)) = abs(log(x) - log(y)).
@DMWatchesYoutube8 ай бұрын
Now is a good time to stop.... continues for almost an hour. Dedication
@Realspace2 Жыл бұрын
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)
@Realspace2 Жыл бұрын
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