From a6f1d65817d345731c06de99d88f7ac8c95cb7c8 Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Thu, 28 Sep 2017 13:28:37 +0900 Subject: [PATCH] [4.0] Initialize random number generator This reverts commit bfadf27db5d885b3654d5b2662ac2f1f154d4001. Change-Id: I48ff214e69ee2886a6344562220a32a61a05ce89 --- dali/public-api/math/random.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dali/public-api/math/random.h b/dali/public-api/math/random.h index 8067112..97818f5 100644 --- 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); } -- 2.7.4