MCPcopy Create free account
hub / github.com/LabSound/LabSound / rnd

Function rnd

src/extended/SfxrNode.cpp:192–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190using namespace lab;
191
192inline uint32_t rnd(uint32_t n)
193{
194 if (n == 1)
195 return ((rand() & 0x7fff) > 0x3fff) ? 1 : 0;
196 return rand() % (n + 1);
197}
198
199#define PI 3.14159265f
200

Callers 10

frndFunction · 0.85
coinMethod · 0.85
laserMethod · 0.85
explosionMethod · 0.85
powerUpMethod · 0.85
hitMethod · 0.85
jumpMethod · 0.85
selectMethod · 0.85
mutateMethod · 0.85
randomizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected