Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IceRandom.h
Go to the documentation of this file.
1 
8 
11 // Include Guard
12 #ifndef __ICERANDOM_H__
13 #define __ICERANDOM_H__
14 
15  ICECORE_API void SRand(udword seed);
16  udword Rand();
17 
20 
23 
25  {
26  public:
27 
29  inline_ BasicRandom(udword seed=0) : mRnd(seed) {}
32 
33  inline_ void SetSeed(udword seed) { mRnd = seed; }
34  inline_ udword GetCurrentValue() const { return mRnd; }
35  inline_ udword Randomize() { mRnd = mRnd * 2147001325 + 715136305; return mRnd; }
36 
37  private:
38  udword mRnd;
39  };
40 
41 #endif // __ICERANDOM_H__
42