mirror of
https://github.com/copyrighttxt/watrbx-game-engine.git
synced 2026-09-05 13:17:49 +00:00
GEEKING
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2014 ROBLOX Corporation, All Rights Reserved */
|
||||
#include "stdafx.h"
|
||||
|
||||
class LcmRand
|
||||
{
|
||||
public:
|
||||
LcmRand() : seed(1337U) {}
|
||||
|
||||
uint32_t value()
|
||||
{
|
||||
const static uint32_t a = 214013U;
|
||||
const static uint32_t c = 2531011U;
|
||||
seed = seed * a + c;
|
||||
return (seed >> 16) & 0x7FFF;
|
||||
}
|
||||
|
||||
void setSeed(uint32_t newSeed)
|
||||
{
|
||||
seed = newSeed;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32_t seed;
|
||||
};
|
||||
Reference in New Issue
Block a user