diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
commit | 9892736206676c5b7fabc8d1184f9655511ff2dd (patch) | |
tree | 83562ac50c93fe3004959d35c1af4a5b380fdd97 /source/blender/blenlib/BLI_rand.h | |
parent | cffaa42d3a34c6b310c3c87c98e1f8313881e473 (diff) |
code cleanup: header cleanup and remove some duplicate defines.
Diffstat (limited to 'source/blender/blenlib/BLI_rand.h')
-rw-r--r-- | source/blender/blenlib/BLI_rand.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/source/blender/blenlib/BLI_rand.h b/source/blender/blenlib/BLI_rand.h index d4d6563ac99..7dd6c8575c9 100644 --- a/source/blender/blenlib/BLI_rand.h +++ b/source/blender/blenlib/BLI_rand.h @@ -40,59 +40,59 @@ struct RNG; typedef struct RNG RNG; -struct RNG* rng_new (unsigned int seed); -void rng_free (struct RNG* rng); +struct RNG *rng_new(unsigned int seed); +void rng_free(struct RNG *rng); -void rng_seed (struct RNG* rng, unsigned int seed); +void rng_seed(struct RNG *rng, unsigned int seed); void rng_srandom(struct RNG *rng, unsigned int seed); -int rng_getInt (struct RNG* rng); -double rng_getDouble (struct RNG* rng); -float rng_getFloat (struct RNG* rng); -void rng_shuffleArray(struct RNG *rng, void *data, int elemSize, int numElems); +int rng_getInt(struct RNG *rng); +double rng_getDouble(struct RNG *rng); +float rng_getFloat(struct RNG *rng); +void rng_shuffleArray(struct RNG *rng, void *data, int elemSize, int numElems); - /** Note that skipping is as slow as generating n numbers! */ -void rng_skip (struct RNG *rng, int n); +/** Note that skipping is as slow as generating n numbers! */ +void rng_skip(struct RNG *rng, int n); - /** Seed the random number generator */ -void BLI_srand (unsigned int seed); +/** Seed the random number generator */ +void BLI_srand(unsigned int seed); - /** Better seed for the random number generator, using noise.c hash[] */ -void BLI_srandom (unsigned int seed); +/** Better 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); +/** Return a pseudo-random number N where 0<=N<(2^31) */ +int BLI_rand(void); - /** Return a pseudo-random number N where 0.0<=N<1.0 */ -double BLI_drand (void); +/** Return a pseudo-random number N where 0.0<=N<1.0 */ +double BLI_drand(void); - /** Return a pseudo-random number N where 0.0f<=N<1.0f */ -float BLI_frand (void); +/** Return a pseudo-random number N where 0.0f<=N<1.0f */ +float BLI_frand(void); - /** Fills a block of memory starting at \a addr - * and extending \a len bytes with pseudo-random - * contents. This routine does not use nor modify - * the state of the BLI random number generator. - */ -void BLI_fillrand (void *addr, int len); +/** Fills a block of memory starting at \a addr + * and extending \a len bytes with pseudo-random + * contents. This routine does not use nor modify + * the state of the BLI random number generator. + */ +void BLI_fillrand(void *addr, int len); - /** Shuffle an array randomly using the given seed. - * contents. This routine does not use nor modify - * the state of the BLI random number generator. - */ -void BLI_array_randomize (void *data, int elemSize, int numElems, unsigned int seed); +/** Shuffle an array randomly using the given seed. + * contents. This routine does not use nor modify + * the state of the BLI random number generator. + */ +void BLI_array_randomize(void *data, int elemSize, int numElems, unsigned int seed); - /** Better seed for the random number generator, using noise.c hash[] */ - /** Allows up to BLENDER_MAX_THREADS threads to address */ -void BLI_thread_srandom (int thread, unsigned int seed); +/** Better seed for the random number generator, using noise.c hash[] */ +/** Allows up to BLENDER_MAX_THREADS threads to address */ +void BLI_thread_srandom(int thread, unsigned int seed); - /** Return a pseudo-random number N where 0<=N<(2^31) */ - /** Allows up to BLENDER_MAX_THREADS threads to address */ -int BLI_thread_rand (int thread); +/** Return a pseudo-random number N where 0<=N<(2^31) */ +/** Allows up to BLENDER_MAX_THREADS threads to address */ +int BLI_thread_rand(int thread); - /** Return a pseudo-random number N where 0.0f<=N<1.0f */ - /** Allows up to BLENDER_MAX_THREADS threads to address */ -float BLI_thread_frand (int thread); +/** Return a pseudo-random number N where 0.0f<=N<1.0f */ +/** Allows up to BLENDER_MAX_THREADS threads to address */ +float BLI_thread_frand(int thread); |