MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / randomFloat

Function randomFloat

Extras/InverseDynamics/IDRandomUtil.cpp:21–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19int randomInt(int low, int high) { return rand() % (high + 1 - low) + low; }
20
21float randomFloat(float low, float high)
22{
23 return low + static_cast<float>(rand()) / RAND_MAX * (high - low);
24}
25
26float randomMass() { return randomFloat(mass_min, mass_max); }
27

Callers 5

randomMassFunction · 0.85
randomInertiaPrincipalFunction · 0.85
randomInertiaMatrixFunction · 0.85
randomAxisFunction · 0.85
getBodyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected