Page 1 of 1

updated random number generator module

Posted: Tue Apr 11, 2023 3:18 pm
by Jerry Messina
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)