
- Refactor drawing to keep blocks persistent in memory - Make string usage easier & more consisten (macros for string vs const char*) - rdtsc intrinsic (get cycle count) - Profiling macros (generates a google trace json) - Write D3D11 debug messages to stdout - String_Builder & thorough tests for it
17 lines
No EOL
412 B
C
17 lines
No EOL
412 B
C
// This is a naive implementation for now (LCG)
|
|
// Distribution will probably suck.
|
|
|
|
#define RAND_MAX_64 0xFFFFFFFFFFFFFFFFull
|
|
#define MULTIPLIER 6364136223846793005ull
|
|
#define INCREMENT 1ull
|
|
|
|
u64 seed_for_random = 1;
|
|
|
|
u64 get_random() {
|
|
seed_for_random = seed_for_random * MULTIPLIER + INCREMENT;
|
|
return seed_for_random;
|
|
}
|
|
|
|
f32 get_random_float32() {
|
|
return (float32)get_random()/(float32)UINT64_MAX;
|
|
} |