3 ms·
The funny thing about that table is that rand(100) never returns 100. I wonder if that was on purpose.
by davidcuddeback 13y ago
The funny thing about that table is that rand(100) never returns 100. I wonder if that was on purpose.
- jmduke 13y agoFrom the source (http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-programmer/ http://www.kalzumeus.com/2011/10/28/dont-call-yourself-a-pro...): Perceptive readers will note that 100 does not actually show up on a d100 or rand(100). (Read the whole article, it's wonderful.)
- davidcuddeback 13y agoThanks. I must not be that perceptive of a reader, because I've actually read that article before, but don't remember that part of it. I agree that it's a great article. Probably time for me to give it another read.
- TillE 13y ago> Perceptive readers will note that 100 does not actually show up on a d100 This is simply incorrect. For example, a d6 goes from 1 to 6, a d8 from 1 to 8, etc. The bounds are implicit in the notation of dX. A d100 roll is meant to be 1-100; you roll two d10s and each die represents one digit. 00 is taken to be 100. Now, if you're rolling a percentile, you follow the same procedure except 00 might represent 0%. In that case, 100% is excluded. However this is never called a d100.
- James_Duval 13y agoI think it's a joke.