-
Very cool. I tested it and it works very nicely! Thanks very much! This way we have the best of both worlds.
The only thing I might do differently is to let E.hwRand() return a long int. This way you would not get signed values back but always unsigned. Signed random values are a bit unusual I would say. But it does not really matter much.
Being able to load C stuff directly would also be very cool. Although it is not too difficult to compile your own version - the documentation is very good...
Ok, just added this - it'll be in the next release. The random number generator will automatically seed itself from the voltage reference at startup, or you can use
E.hwRand()
to get a random value from hardware, orE.srand(..)
to seedMath.random