My Project
core
osl
random.h
Go to the documentation of this file.
1
#ifndef OSL_RANDOM_H
2
#define OSL_RANDOM_H
3
namespace
osl
4
{
5
namespace
misc
6
{
7
unsigned
int
random
();
8
unsigned
int
time_seeded_random
();
9
template
<
typename
T>
10
struct
Random
;
11
template
<>
12
struct
Random
<unsigned int>{
13
static
unsigned
int
newValue
(){
14
return
random
();
15
}
16
};
17
template
<>
18
struct
Random
<unsigned long long>{
19
static
unsigned
long
long
newValue
(){
20
return
(
static_cast<
unsigned
long
long
>
(
random
())<<32ull)|
21
static_cast<
unsigned
long
long
>
(
random
());
22
}
23
};
24
}
// namespace misc
25
using
osl::misc::random
;
26
using
osl::misc::time_seeded_random
;
27
}
// namespace osl
28
#endif
/* _RANDOM_H */
29
// ;;; Local Variables:
30
// ;;; mode:c++
31
// ;;; c-basic-offset:2
32
// ;;; End:
osl::misc::time_seeded_random
unsigned int time_seeded_random()
Definition
random.cc:10
osl::misc::random
unsigned int random()
Definition
random.cc:4
osl
Definition
additionalEffect.h:6
osl::misc::Random< unsigned int >::newValue
static unsigned int newValue()
Definition
random.h:13
osl::misc::Random< unsigned long long >::newValue
static unsigned long long newValue()
Definition
random.h:19
osl::misc::Random
Definition
random.h:10
Generated by
1.9.8