Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
19
inline_
float
UnitRandomFloat
() {
return
float
(
Rand
()) *
ONE_OVER_RAND_MAX
; }
20
22
ICECORE_API
udword
GetRandomIndex
(
udword
max_index);
23
24
class
ICECORE_API
BasicRandom
25
{
26
public
:
27
29
inline_
BasicRandom
(
udword
seed=0) : mRnd(seed) {}
31
inline_
~BasicRandom
() {}
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
src
cmd
collide2
Ice
IceRandom.h
Generated on Fri May 29 2015 23:07:12 for Vegastrike 0.5.1 rc1 by
1.8.4