projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[4.0] Initialize random number generator
[platform/core/uifw/dali-core.git]
/
dali
/
public-api
/
math
/
random.h
diff --git
a/dali/public-api/math/random.h
b/dali/public-api/math/random.h
index
8067112
..
97818f5
100644
(file)
--- a/
dali/public-api/math/random.h
+++ b/
dali/public-api/math/random.h
@@
-48,6
+48,7
@@
inline float Range(float f0, float f1)
{
float min = std::min(f0, f1);
float max = std::max(f0, f1);
+ srand( time( NULL ) );
return min + (rand() & 0xfff) * (max-min) * (1.0f/4095.0f);
}