pif_RandomNumber |
|
This is a pseudo-random number generator that will produce the same numbers in a sequence for the same seed and bounds on any system. [More] |
To download this library for your Linux/Mac installation, enter this on your command line:
DreamDownload byond://Popisfizzy.pif_RandomNumber##version=6 Emulator users, in the BYOND pager go to File | Open Location and enter this URL:byond://Popisfizzy.pif_RandomNumber##version=6 |
This library is used to create an instance of a random number generator. Unlike BYOND's built-in generator (actually, the standard C/C++ pseudorandom number generator), this one is platform independent and consistent. This means that given the same seed and the same series of calls, the PRNGs will produce the same numbers each time, which can be useful for certain applications.
As I find myself being able to implement new PRNGs, I will update the library. One generator that I really want to implement in the Mersenne Twister, but my attempt at modifying a 16-bit implementation was a miserable failure. If you find implementations of different PRNGs that will work on BYOND, please submit your source (preferably with some sort of code) to the forums. Versions: Version 2.01 (February 28, 2008):
Thanks goes to Hulio-G for the awesome hub icon. |
Copyright © 2024 BYOND Software.
All rights reserved.