delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/01/03:12:50

From: "Rehammar" <rehammar AT telia DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: random
Date: Sun, 31 Jan 1999 21:30:41 +0100
Organization: Telia Internet Services
Lines: 12
Message-ID: <36b4bcff.0@d2o25.telia.com>
NNTP-Posting-Host: d2o25.telia.com
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-NNTP-Posting-Host: 195.198.161.54
X-Complaints-To: abuse AT internet DOT telia DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The debate som days ago was about random() and ravn() and the seeds to them.
Now this isn't my pob, my problem is that I whant to tehh rand() (or
random()) in what range the number will be. I fount thet I could do this by
typing

a=range*(float)random()/(float)RAND_MAX;

but I didn't likt the way of doing it, is there no other way ??

\\Ravn, Robert Rehammar


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019