Bobert13
Prince
- Joined
- Feb 25, 2013
- Messages
- 346
That page is doing something weird with the seed for it's random. If you input your own, it behaves as expected:
Either of the methods I posted already accomplish "percentage" functionality. You don't need a random integer and a random float generated separately. It won't make it any "more random". Granted the percentage functionality offered assumes you input a percentage that's already been converted to decimal but that's kinda insignificant. I suppose you could always do 100 * random > value but how is that functionally any different than random > value / 100?
Code:
--math.randomseed(os.time())
return math.random(), math.random(), math.random()
Either of the methods I posted already accomplish "percentage" functionality. You don't need a random integer and a random float generated separately. It won't make it any "more random". Granted the percentage functionality offered assumes you input a percentage that's already been converted to decimal but that's kinda insignificant. I suppose you could always do 100 * random > value but how is that functionally any different than random > value / 100?