lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 29 Sep 2015 08:03 PM |
this skid thinks we can't identify the difference between a genuine troll and an idiot claiming to be a troll to cover up
seriously, why do you morons try to pull that "I'm trolling" BS anyway? |
|
|
| Report Abuse |
|
|
|
| 29 Sep 2015 08:03 PM |
Shhh
cnt is the roast sensei
Instance.new("BodyThrust" , Illegallyblind.Pelvis) |
|
|
| Report Abuse |
|
|
SlickV
|
  |
| Joined: 23 Apr 2015 |
| Total Posts: 78 |
|
|
| 29 Sep 2015 08:04 PM |
| I can not see, I'm legally blind. |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 29 Sep 2015 08:50 PM |
@OP This isn't really useful, but it does pertain to the original question. In most cases you're perfectly fine using either case you mentioned to seed. Anyways...
There really isn't a difference between one or the other. It's just a different seed as cntkillme said. The con to using time itself as a seed is that the PRNG that roblox uses tends to be biased by the most significant bits of the double passed to it. *Note: After x iterations of math.random() you will see deviation, that's due to the LSBs of tick(); the MSBs create an initial bias since they change very slowly with respect to time.
What this means is if you seed the PRNG multiple times in a small time frame you'll end up with similar values. While this normally isn't much of an issue it can be appear to be a weird bug when you do rapid testing in play-solo//test server.
A quick way around this to use: math.randomseed(tick()%1*1e6)
This uses the fractional part of a second (only the least significant bits of time) to seed since they change the most frequently.
Basically try this in commandline: for i = 1, 300 do math.randomseed(tick()) print(math.random()) wait() end
Then try: for i = 1, 30 do math.randomseed(tick()%1*1e6) print(math.random()) wait() end
|
|
|
| Report Abuse |
|
|