View Full Version: Idiot-Proof Random Numbers

C++ Learning Community > C++ Tips > Idiot-Proof Random Numbers


Title: Idiot-Proof Random Numbers
Description: My easy system.


TheHawgMaster - November 1, 2003 02:52 AM (GMT)
Go to my site and check out my Idiot-Proof Random Number System. Hopefully It'll help out all of the peole who keep posting about issues wit hthe standard C random system. Mine lets you just say stuff like:
CODE
float someFloat = random.Float(100.0f, 200.0f);
And someFloat will contain a random float from 100 to 200. It is also rather fast (especially with floating point numbers) and much cleaner in syntax than using plain old rand().

btw this was a toss-up between tips and creations... I decided on tips since it wasn't really a program.

ih8censorship - November 1, 2003 03:07 AM (GMT)
when someone makes something that is idiot proof they start making better idiots. :lol:




* Hosted for free by InvisionFree