delorie.com/archives/browse.cgi | search |
Date: | Wed, 9 Feb 2000 09:14:15 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
X-Sender: | eliz AT is |
To: | Night Walker <night DOT walker AT tiscalinet DOT it> |
cc: | djgpp AT delorie DOT com |
Subject: | Re: Allegro and random numbers. |
In-Reply-To: | <38A020E4.9D28E963@tiscalinet.it> |
Message-ID: | <Pine.SUN.3.91.1000209091129.9816Q-100000@is> |
MIME-Version: | 1.0 |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | dj-admin AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Tue, 8 Feb 2000, Night Walker wrote: > You can also use a LookUpTable, with pre-defined values: it is more flexible > and faster. > This is the code used in DOOM: Unless I'm missing something, this code has a period of 256. That is, the numbers it produces repeat themselves every 256 calls. Some applications cannot work with such a short period. For comparison, `rand' has a period of at least 2^31, and `random' has much larger period.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |