MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / WeakRandomFloat

Function WeakRandomFloat

src/public/vstdlib/random.h:9–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8inline void WeakRandomSeed( int x ) { srand(x); }
9inline float WeakRandomFloat( float flMin, float flMax )
10{
11 return flMin + ( (float)rand() / (float)RAND_MAX ) * ( flMax - flMin );
12}
13inline int WeakRandomInt( int nMin, int nMax )
14{
15 return nMin + rand() % ( nMax - nMin + 1 );

Callers 4

RandomBoolWithOddsFunction · 0.85
RandomJitterFunction · 0.85
BSendRawPacketGatherMethod · 0.85
DrainSocketFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected