diff options
Diffstat (limited to 'Source/Library/Common/Rand.ns.cpp')
-rw-r--r-- | Source/Library/Common/Rand.ns.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Library/Common/Rand.ns.cpp b/Source/Library/Common/Rand.ns.cpp index e568678..6323ccc 100644 --- a/Source/Library/Common/Rand.ns.cpp +++ b/Source/Library/Common/Rand.ns.cpp @@ -7,7 +7,7 @@ u64int current = RANDOM_SEED; u64int rand() { current = (u32int)(a*current + b); - while (current > m) current -= m; + if (current > m) current = current % m; return current; } |