Closed unitof closed 4 years ago
Checked a bunch of others. All the primary money ones, the death in the disease eradication section, and a couple of the inset money ones. All were accurate. So I think it's just this $1 million square that's slightly off.
Yes please, a pull request would be welcomed for this! I may have just made a typo entering 33.62 instead of 31.62. It's 1 pixel on every side, so I doubt it's perceptible, but I'd still like to correct it. Thank you!
Hey, perfect timing! Swear I didn't actually do it that fast.
Just curious how some of the
div
height/width were calculated, especially for some of the smaller boxes, as they don't seem to always multiply to the value the represent.For example, the $1 million square in the beginning:
https://github.com/MKorostoff/1-pixel-wealth/blob/a018484427ebb9d0c284aa436a3f2cc1e769ea97/main.css#L278-L279
The $1 million
div
is a33.62px
square.33.62² pixels × $1,000 per pixel = $1,130,304.40. It's about 13% too big.
Shouldn't it be
sqrt($1,000,000 / 1000)px
≈31.62px
?I checked some of the larger ones (like the Bezos $139 billion) and they are accurate.
I'll happily do a PR for the $1 million div and see if I catch any others that are a bit off along the way, but wanted to check first if this is by design.