MCPcopy Create free account
hub / github.com/defold/defold / RandOpen01

Function RandOpen01

engine/dlib/src/dlib/math.h:105–108  ·  view source on GitHub ↗

* Return a random number in the interval [0,1). */

Source from the content-addressed store, hash-verified

103 * Return a random number in the interval [0,1).
104 */
105 inline float RandOpen01(uint32_t* seed)
106 {
107 return (Rand(seed)%DM_RAND_MAX) * DM_RAND_MAX_RECIP;
108 }
109
110 /**
111 * Return a random number in the interval [-1,1].

Callers 1

SpawnParticleFunction · 0.85

Calls 1

RandFunction · 0.85

Tested by

no test coverage detected