Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-06-12 16:46:50 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-12 16:51:43 +0300
commitb236400ff5b6b18f0b81fb326b95719be7ebe379 (patch)
tree40f26df0afe11f2193ae686422089b0e82e3e915 /source/blender/blenlib/BLI_rand.h
parent6231a077ac96b546d41404ef423fc23e1fa01803 (diff)
Math: Remove unused functions which are not safe for threading
All areas are toy use "local" number generator, in order to keep behavior predictable and threadable. This is what BLI_rng_() API is for. There are still lots of usages of BLI_frand(), which are to be ported to BLI_rng_get_float(). but that is somewhat involved. For the time being, remove unsafe API, so new areas have zero chance using it.
Diffstat (limited to 'source/blender/blenlib/BLI_rand.h')
-rw-r--r--source/blender/blenlib/BLI_rand.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h
index 69b23b2473f..811a6ba1768 100644
--- a/source/blender/blenlib/BLI_rand.h
+++ b/source/blender/blenlib/BLI_rand.h
@@ -64,15 +64,9 @@ void BLI_rng_shuffle_array(struct RNG *rng, void *data, unsigned int elem
/** Note that skipping is as slow as generating n numbers! */
void BLI_rng_skip(struct RNG *rng, int n) ATTR_NONNULL(1);
-/** Seed for the random number generator, using noise.c hash[] */
-void BLI_srandom(unsigned int seed);
-
-/** Return a pseudo-random number N where 0<=N<(2^31) */
-int BLI_rand(void) ATTR_WARN_UNUSED_RESULT;
-
/** Return a pseudo-random number N where 0.0f<=N<1.0f */
+/* !!!!! NOTE: DO NOT USE IT IN NEW CODE !!!!! */
float BLI_frand(void) ATTR_WARN_UNUSED_RESULT;
-void BLI_frand_unit_v3(float v[3]);
/** Return a pseudo-random (hash) float from an integer value */
float BLI_hash_frand(unsigned int seed) ATTR_WARN_UNUSED_RESULT;