Better HN
topnewbestaskshowjobs
Log inSign up

Enigma02

4 karma · joined Aug 13, 2023 (3y ago) · 1 submissions

Submissions

comment 3y ago · link · parent

For the posed question you could assume that each rectangle has area 1, so the square has area 5. From there its pretty easy to find the lengths of relevant sides, which can then tell you how much you need to scale by.

Of course for more complicated layouts this method won't work as well, but at least for this simple one this method seems easier.