MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / staticRandomU32Range

Function staticRandomU32Range

source/core/StarStaticRandom.hpp:63–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62template <typename T, typename... TL>
63uint32_t staticRandomU32Range(uint32_t min, uint32_t max, T const& d, TL const&... rest) {
64 uint64_t denom = (uint64_t)(-1) / ((uint64_t)(max - min) + 1);
65 return staticRandomU64(d, rest...) / denom + min;
66}
67
68template <typename T, typename... TL>
69int64_t staticRandomI64(T const& d, TL const&... rest) {

Callers 3

dungeonsMethod · 0.85
staticRandomShuffleFunction · 0.85

Calls 1

staticRandomU64Function · 0.85

Tested by

no test coverage detected