(12C) Random Number (No Seed Needed)
|
12-31-2017, 08:34 AM
Post: #2
|
|||
|
|||
RE: (12C) Random Number (No Seed Needed)
You can save a few bytes of code and generate numbers from 1 to 999999 (instead of 999998).
The result of FRAC is necessarily going to be less than one, so multiply it by "1E6" instead of 999999 before taking the integer part. Either that or do what most PRNGs do on calculators and just return the fractional part. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C) Random Number (No Seed Needed) - Gamo - 12-31-2017, 08:13 AM
RE: (12C) Random Number (No Seed Needed) - grsbanks - 12-31-2017 08:34 AM
RE: (12C) Random Number (No Seed Needed) - Gamo - 12-31-2017, 09:07 AM
RE: (12C) Random Number (No Seed Needed) - grsbanks - 12-31-2017, 10:10 AM
RE: (12C) Random Number (No Seed Needed) - Dieter - 12-31-2017, 09:11 PM
|
User(s) browsing this thread: 2 Guest(s)