Dim i As Integer i = Floor(Rnd * n)
where 'Rnd' is your random-number generator routine API. (Please note, RB already has an Rnd() function...)
On Jun 23, 2006, at 10:56 AM, Jamie Lay wrote:
All, I'm brain-dead today. I need to take a double returned from a hardware random number generator and make it a ranged random such that 0 < n < 1. Would someone please put me out of my misery and post the code to do the conversion. Thanks, Jamie Software Factory, LLC Sales 800-539-1780 Support 706-632-3763 Fax 706-632-6498 www.installfactory.com _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
William H Squires Jr 4400 Horizon Hill #4006 San Antonio, TX 78229 [EMAIL PROTECTED] <- remove the .nospam _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
