Un-reverted commit 14ca947 (love.math.setRandomSeed internally calling random() a few times) for the minor branch.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2014-09-28 16:05:17 -03:00
parent 8edb90a719
commit d4ad571780
3 changed files with 6 additions and 5 deletions
+5
View File
@@ -81,6 +81,11 @@ void RandomGenerator::setSeed(RandomGenerator::Seed newseed)
seed = newseed;
rng_state = seed;
// Xorshift's first couple results after seeding will be similar to results
// from very similar seeds, so we immediately discard them here.
for (int i = 0; i < 2; i++)
rand();
}
RandomGenerator::Seed RandomGenerator::getSeed() const