BS> Look up ROLLDICE.C in SNIPPETS. Although it's in C, I
BS> also have a C++ implementation saved here somewhere,
BS> although I can't find it right this minute.
bs>...
Thanks for the support. :)
I just posted a C++ version. The one in SNIPPETS, by the way,
may not give the full range of numbers as it should.
You really need to go one above your maximum and then subtract
one from the result before the division to ensure the full
range of integer values, 0-max.9999. Otherwise, you get a
proportionally uneven distribution on the highest allowable
value in your random routine. In short, though it did look
good, I actually screwed up again. *(- sigh -)*
Much better now, though...
> ] This Universe is 3-D captioned for the Magic Eye impaired...
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|