From: Seoyeon Kim Date: Mon, 4 Jul 2016 10:23:03 +0000 (+0900) Subject: [3.0] Restore the code at random.h X-Git-Tag: accepted/tizen/common/20160705.170854^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F78140%2F1;p=platform%2Fcore%2Fuifw%2Fdali-core.git [3.0] Restore the code at random.h - It could be a big waste of memory, so restore the code before Change-Id: I9f1f21f727c0c6ac4e2c0b2fdb1cdccf95847eef --- diff --git a/dali/public-api/math/random.h b/dali/public-api/math/random.h index 394b2dd..5ba0c95 100644 --- a/dali/public-api/math/random.h +++ b/dali/public-api/math/random.h @@ -35,11 +35,6 @@ namespace Dali namespace Random { -namespace -{ - __thread unsigned int seed; -} - /** * @brief Returns a random number between f0 and f1. * @@ -51,10 +46,9 @@ namespace */ inline float Range(float f0, float f1) { - seed = time(NULL); float min = std::min(f0, f1); float max = std::max(f0, f1); - return min + (rand_r(&seed) & 0xfff) * (max-min) * (1.0f/4095.0f); + return min + (rand() & 0xfff) * (max-min) * (1.0f/4095.0f); } /**