blob: 6323ccc3c0edaccacea2b5302f381a52dc3c2927 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "Rand.ns.h"
namespace Rand {
u32int m = 2073741824, a = 50000, b = 1534;
u64int current = RANDOM_SEED;
u64int rand() {
current = (u32int)(a*current + b);
if (current > m) current = current % m;
return current;
}
u64int max() {
return m;
}
}
|