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

Function staticRandomDouble

source/core/StarStaticRandom.hpp:86–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84// Generates values in the range [0.0, 1.0]
85template <typename T, typename... TL>
86double staticRandomDouble(T const& d, TL const&... rest) {
87 return (staticRandomU64(d, rest...) & 0x7fffffffffffffff) / 9223372036854775808.0;
88}
89
90template <typename T, typename... TL>
91double staticRandomDoubleRange(double min, double max, T const& d, TL const&... rest) {

Callers 5

staticRandomDoubleRangeFunction · 0.85
selectIndexMethod · 0.85

Calls 1

staticRandomU64Function · 0.85

Tested by

no test coverage detected