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

Function staticRandomFloat

source/core/StarStaticRandom.hpp:75–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73// Generates values in the range [0.0, 1.0]
74template <typename T, typename... TL>
75float staticRandomFloat(T const& d, TL const&... rest) {
76 return (staticRandomU32(d, rest...) & 0x7fffffff) / 2147483648.0;
77}
78
79template <typename T, typename... TL>
80float staticRandomFloatRange(float min, float max, T const& d, TL const&... rest) {

Callers 10

placeBiomeGrassMethod · 0.85
reapplyBiomeMethod · 0.85
createTreasureMethod · 0.85
itemToPlaceMethod · 0.85
locationSkyParametersMethod · 0.85
SkyParametersMethod · 0.85
WormCaveSectorMethod · 0.85
SectorMethod · 0.85
mainFunction · 0.85
staticRandomFloatRangeFunction · 0.85

Calls 1

staticRandomU32Function · 0.85

Tested by

no test coverage detected