Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenStarbound/OpenStarbound
/ randf
Method
randf
source/core/StarRandom.cpp:78–80 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
76
}
77
78
float RandomSource::randf() {
79
return (randu32() & 0x7fffffff) / 2147483648.0f;
80
}
81
82
double RandomSource::randd() {
83
return (randu64() & 0x7fffffffffffffff) / 9223372036854775808.0;
Callers
15
generateNpcVariant
Method · 0.80
planetOrbitDistance
Method · 0.80
planetPosition
Method · 0.80
randomArrivalPosition
Method · 0.80
produceChunk
Method · 0.80
produceSystem
Method · 0.80
produceConstellations
Method · 0.80
update
Method · 0.80
chooseOption
Function · 0.80
createItem
Method · 0.80
Parallax
Method · 0.80
buildLayer
Method · 0.80
Calls
3
randu32
Function · 0.85
StarException
Class · 0.85
randf
Function · 0.85
Tested by
1
TEST
Function · 0.64