MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / frand

Function frand

cpp/5_Domain_Specific/smokeParticles/ParticleSystem.cpp:160–160  ·  view source on GitHub ↗

random float [0, 1]

Source from the content-addressed store, hash-verified

158
159// random float [0, 1]
160inline float frand() { return rand() / (float)RAND_MAX; }
161
162// signed random float [-1, 1]
163inline float sfrand() { return frand() * 2.0f - 1.0f; }

Callers 3

sfrandFunction · 0.70
discEmitterMethod · 0.70
sphereEmitterMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected