MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / generate

Function generate

src/Engine/RNG.cpp:74–78  ·  view source on GitHub ↗

* Generates a random integer number within a certain range. * @param min Minimum number, inclusive. * @param max Maximum number, inclusive. * @return Generated number. */

Source from the content-addressed store, hash-verified

72 * @return Generated number.
73 */
74int generate(int min, int max)
75{
76 uint64_t num = next();
77 return (int)(num % (max - min + 1) + min);
78}
79
80/**
81 * Generates a random decimal number within a certain range.

Callers 15

boxMullerFunction · 0.85
percentFunction · 0.85
newMonthMethod · 0.85
getSpawnNodeMethod · 0.85
getPatrolNodeMethod · 0.85
SoldierMethod · 0.85
trainPsiMethod · 0.85
trainPsi1DayMethod · 0.85
igniteMethod · 0.85
setFireMethod · 0.85
addSmokeMethod · 0.85

Calls 1

nextFunction · 0.85

Tested by

no test coverage detected