Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TombEngine/TombEngine
/ TestProbability
Function
TestProbability
TombEngine/Math/Random.cpp:179–191 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
177
}
178
179
bool TestProbability(float prob)
180
{
181
if (prob <= 0.0f)
182
{
183
return false;
184
}
185
else if (prob >= 1.0f)
186
{
187
return true;
188
}
189
190
return (GenerateFloat(0.0f, 1.0f) < prob);
191
}
192
}
Callers
15
SpearGuardianControl
Function · 0.85
SmallSpiderControl
Function · 0.85
BigSpiderControl
Function · 0.85
SilencerControl
Function · 0.85
KnifeThrowerControl
Function · 0.85
BirdMonsterControl
Function · 0.85
WorkerShotgunControl
Function · 0.85
RatControl
Function · 0.85
YetiControl
Function · 0.85
SwordGuardianControl
Function · 0.85
MPGunControl
Function · 0.85
CivvyControl
Function · 0.85
Calls
1
GenerateFloat
Function · 0.85
Tested by
no test coverage detected