Public Member Functions
-
Rand ()=default
-
Rand (uint32_t seed)
-
voidseed (uint32_t seedValue)
Re-seeds the random generator.
-
boolnextBool ()
returns a random boolean value
-
int32_tnextInt ()
returns a random integer in the range [-2147483648,2147483647]
-
uint32_tnextUint ()
returns a random integer in the range [0,4294967296)
-
int32_tnextInt (int32_t v)
returns a random integer in the range [0,v)
-
uint32_tnextUint (uint32_t v)
returns a random integer in the range [0,v)
-
int32_tnextInt (int32_t a, int32_t b)
returns a random integer in the range [a,b)
-
floatnextFloat ()
returns a random float in the range [0.0f,1.0f)
-
floatnextFloat (float v)
returns a random float in the range [0.0f,v)
-
floatnextFloat (float a, float b)
returns a random float in the range [a,b)
-
floatposNegFloat (float a, float b)
returns a random float in the range [a,b] or the range [-b,-a)
-
vec3nextVec3 ()
returns a random vec3 that represents a point on the unit sphere
-
vec2nextVec2 ()
returns a random vec2 that represents a point on the unit circle
-
floatnextGaussian ()
returns a random float via Gaussian distribution, with a mean of 0 and a standard deviation of 1.0
Static Public Member Functions
-
voidrandomize ()
Resets the static random generator to a random seed.
-
voidrandSeed (uint32_t seedValue)
Resets the static random generator to the specific seed seedValue .
-
boolrandBool ()
returns a random boolean value
-
int32_trandInt ()
returns a random integer in the range [-2147483648,2147483647]
-
uint32_trandUint ()
returns a random integer in the range [0,4294967296)
-
int32_trandInt (int32_t v)
returns a random integer in the range [0,v)
-
uint32_trandUint (uint32_t v)
returns a random integer in the range [0,v)
-
int32_trandInt (int32_t a, int32_t b)
returns a random integer in the range [a,b)
-
floatrandFloat ()
returns a random float in the range [0.0f,1.0f)
-
floatrandFloat (float v)
returns a random float in the range [0.0f,v)
-
floatrandFloat (float a, float b)
returns a random float in the range [a,b)
-
floatrandPosNegFloat (float a, float b)
returns a random float in the range [a,b) or the range [-b,-a)
-
vec3randVec3 ()
returns a random vec3 that represents a point on the unit sphere
-
vec2randVec2 ()
returns a random vec2 that represents a point on the unit circle
-
floatrandGaussian ()
returns a random float via Gaussian distribution