Minor fixes
*Seed is uint instead of int *Permutation table is uint instead of int, could lead before to program crash with negative seeds Former-commit-id: 49ad04987a09a5f5b4bcab6ee3916db9818172b6
This commit is contained in:
@@ -19,21 +19,23 @@ enum nzNoises
|
||||
class NAZARA_API NzNoiseBase
|
||||
{
|
||||
public:
|
||||
NzNoiseBase(int seed = 0);
|
||||
NzNoiseBase(unsigned int seed = 0);
|
||||
~NzNoiseBase() = default;
|
||||
|
||||
void SetNewSeed(int seed);
|
||||
int GetUniformRandomValue();
|
||||
void SetNewSeed(unsigned int seed);
|
||||
|
||||
void ShufflePermutationTable();
|
||||
|
||||
unsigned int GetUniformRandomValue();
|
||||
|
||||
int fastfloor(float n);
|
||||
int JenkinsHash(int a, int b, int c);
|
||||
protected:
|
||||
int perm[512];
|
||||
unsigned int perm[512];
|
||||
private:
|
||||
int Ua, Uc, Um;
|
||||
int UcurrentSeed;
|
||||
int Uprevious, Ulast;
|
||||
unsigned int Ua, Uc, Um;
|
||||
unsigned int UcurrentSeed;
|
||||
unsigned int Uprevious, Ulast;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user