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

Function sfrand

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

signed random float [-1, 1]

Source from the content-addressed store, hash-verified

161
162// signed random float [-1, 1]
163inline float sfrand() { return frand() * 2.0f - 1.0f; }
164
165// random signed vector
166inline vec3f svrand() { return vec3f(sfrand(), sfrand(), sfrand()); }

Callers 2

svrandFunction · 0.85
randCircleFunction · 0.85

Calls 1

frandFunction · 0.70

Tested by

no test coverage detected