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

Function randCircle

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

random point in circle

Source from the content-addressed store, hash-verified

167
168// random point in circle
169inline vec2f randCircle()
170{
171 vec2f r;
172
173 do {
174 r = vec2f(sfrand(), sfrand());
175 } while (length(r) > 1.0f);
176
177 return r;
178}
179
180// random point in sphere
181inline vec3f randSphere()

Callers 1

discEmitterMethod · 0.85

Calls 2

sfrandFunction · 0.85
lengthFunction · 0.70

Tested by

no test coverage detected