[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: Brett_A._Letner@notes.up.com*Subject*: Re: Interesting problem*From*: Ian Crawford <icrawfor@uoguelph.ca>*Date*: Thu, 6 Aug 1998 12:20:08 -0400 (EDT)*cc*: linuxgames@sunsite.auc.dk

Hmm.... interesting problem. Here's what I'm thinking. Write a function that accepts one double parameter in the range (0,1). The result of this function should be distributed the way you want them to be distributed and should average 4.2. Pass the function a random number in the interval (0,1) and you've got yourself a random result. A couple good math textbooks might speed up your function. If you want to go simple, just make the function a collection of lines. (If the value is < 0.2, use this line, if the value is less that 0.4, use this other line, ...). See what I'm sayin'? Later, Ian ----------------------------------------------------------------- ----- Ian Crawford - Email: icrawfor@uoguelph.ca ---------------- -------------------- URL: http://www.uoguelph.ca/~icrawfor/ ----- -------------------- ICQ: 9625112 ------------------------------- -----------------------------------------------------------------

- Prev by Date:
**My game** - Next by Date:
**Foot Ball Game** - Prev by thread:
**My game** - Next by thread:
**Interesting problem** - Index(es):