diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-16 21:17:48 -0800 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2019-11-16 21:17:48 -0800 |
commit | 133975b5a2ceca273182829f2f11042a5276c2f0 (patch) | |
tree | a7e3b13ffd81484b41122acef5189f060cca365c /Source/Random.cpp | |
parent | fd2fa2211dc09c9030601fde1afd2f7823b22ed8 (diff) | |
download | witness-tutorializer-133975b5a2ceca273182829f2f11042a5276c2f0.tar.gz witness-tutorializer-133975b5a2ceca273182829f2f11042a5276c2f0.tar.bz2 witness-tutorializer-133975b5a2ceca273182829f2f11042a5276c2f0.zip |
Tabs -> spaces everywhere
Diffstat (limited to 'Source/Random.cpp')
-rw-r--r-- | Source/Random.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Random.cpp b/Source/Random.cpp index d6e86a6..61fd30f 100644 --- a/Source/Random.cpp +++ b/Source/Random.cpp | |||
@@ -4,11 +4,11 @@ | |||
4 | int Random::s_seed = static_cast<int>(time(nullptr)); // Seed from the time in milliseconds | 4 | int Random::s_seed = static_cast<int>(time(nullptr)); // Seed from the time in milliseconds |
5 | 5 | ||
6 | void Random::SetSeed(int seed) { | 6 | void Random::SetSeed(int seed) { |
7 | s_seed = seed; | 7 | s_seed = seed; |
8 | } | 8 | } |
9 | 9 | ||
10 | // Returns a random integer in [min, max] | 10 | // Returns a random integer in [min, max] |
11 | int Random::RandInt(int min, int max) { | 11 | int Random::RandInt(int min, int max) { |
12 | s_seed = (214013 * s_seed + 2531011) % 2147483648; | 12 | s_seed = (214013 * s_seed + 2531011) % 2147483648; |
13 | return (s_seed % (max - min + 1)) + min; | 13 | return (s_seed % (max - min + 1)) + min; |
14 | } | 14 | } |