Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
45
Server/RylServerProject/BaseLibrary/Utility/Math/Random.h
Normal file
45
Server/RylServerProject/BaseLibrary/Utility/Math/Random.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#include "PseudoRandom.h"
|
||||
|
||||
namespace Math
|
||||
{
|
||||
class RandomInt
|
||||
{
|
||||
private:
|
||||
PseudoRandomInt random;
|
||||
|
||||
// unable to copy
|
||||
RandomInt(const RandomInt& );
|
||||
void operator =(const RandomInt&);
|
||||
|
||||
public:
|
||||
RandomInt();
|
||||
RandomInt(unsigned long seed);
|
||||
|
||||
void SetSeed(unsigned long seed);
|
||||
|
||||
virtual unsigned int Next();
|
||||
virtual unsigned int Next(unsigned int excludedMax);
|
||||
virtual unsigned int Next(unsigned int includedMin, unsigned int excludedMax);
|
||||
};
|
||||
|
||||
class RandomDouble
|
||||
{
|
||||
private:
|
||||
PseudoRandomFloatClosed random;
|
||||
|
||||
// unable to copy
|
||||
RandomDouble(const RandomDouble& );
|
||||
void operator =(const RandomDouble&);
|
||||
|
||||
public:
|
||||
RandomDouble();
|
||||
RandomDouble(unsigned long seed);
|
||||
|
||||
void SetSeed(unsigned long seed);
|
||||
|
||||
virtual double Next(); // generates a float number [0, 1]
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user