Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DFHack/dfhack
/ unitrandom
Function
unitrandom
library/include/modules/Random.h:80–82 ·
view source on GitHub ↗
[-1, 1]
Source
from the content-addressed store, hash-verified
78
}
79
// [-1, 1]
80
double unitrandom() {
81
return drandom1()*2.0 - 1.0;
82
}
83
84
// Two exact replicas of functions in DF code
85
int32_t df_trandom(uint32_t max=2147483647LU);
Callers
1
unitvector
Method · 0.85
Calls
1
drandom1
Function · 0.85
Tested by
no test coverage detected