repo.or.cz
/
dasher.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tagging release
[dasher.git]
/
trunk
/
Src
/
Common
/
Random.h
blob
8307164aa0073087d6bd9794f005e8167f67148f
1
// Random.h
2
//
3
// Copyright (c) 2005 David Ward
4
5
#ifndef __Random_h__
6
#define __Random_h__
7
8
#include
"Platform.h"
9
10
// Provide platform-independent interfaces for random number generation
11
12
// int RandomInt()
13
// A wrapper for rand() - WinCE3 is missing this function
14
15
#ifdef DASHER_WINCE
16
17
inline
int
RandomInt
() {
18
return
Random
();
19
}
20
21
#else
22
23
#include <stdlib.h>
24
25
inline
int
RandomInt
() {
26
return
rand
();
27
}
28
29
#endif
30
31
#endif