MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / tool_RandomGet

Method tool_RandomGet

Source/Fodder.cpp:7652–7657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7650}
7651
7652uint16 cFodder::tool_RandomGet(size_t pMin, size_t pMax) {
7653 uint16 Rand = mRandom.getu();
7654 uint16 Mod = (uint16) (pMax - pMin + 1);
7655
7656 return (uint16) ((Rand % Mod) + pMin);
7657}
7658
7659int16 cFodder::tool_RandomGet() {
7660

Callers

nothing calls this directly

Calls 2

getuMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected