MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / randomFloat

Function randomFloat

deps/SDL2/Xcode-iOS/Demos/src/common.c:25–29  ·  view source on GitHub ↗

Produces a random float x, min <= x <= max following a uniform distribution */

Source from the content-addressed store, hash-verified

23 following a uniform distribution
24 */
25float
26randomFloat(float min, float max)
27{
28 return rand() / (float) RAND_MAX *(max - min) + min;
29}
30
31void
32fatalError(const char *string)

Callers 5

unitRandomPtMethod · 0.85
unitRandomQuatMethod · 0.85
initializeHappyFacesFunction · 0.85
explodeEmitterFunction · 0.85
spawnTrailFromEmitterFunction · 0.85

Calls 1

randFunction · 0.50

Tested by

no test coverage detected