I created an updated version of David Eather's PseudoRandomNumberGenerator. See PseudoRandomNumberGeneratorV2
This is a single file implementation (no copying/renaming/changing code) that supports byte, word, longword, and floats.
You simply select the data type of interest using #option RAND_T before including the module file.
I also added an overloaded Get RND() function that lets you get a random number in a range of (lower, upper) values, ie b = GetRND(1, 10)
updated random number generator module
Moderators: David Barker, Jerry Messina
-
- Swordfish Developer
- Posts: 1493
- Joined: Fri Jan 30, 2009 6:27 pm
- Location: US