MCPcopy Create free account
hub / github.com/DFHack/dfhack / drandom1

Function drandom1

library/include/modules/Random.h:76–78  ·  view source on GitHub ↗

[0, 1]

Source from the content-addressed store, hash-verified

74 }
75 // [0, 1]
76 double drandom1() {
77 return double(random())/4294967295.0;
78 }
79 // [-1, 1]
80 double unitrandom() {
81 return drandom1()*2.0 - 1.0;

Callers 1

unitrandomFunction · 0.85

Calls 1

randomFunction · 0.85

Tested by

no test coverage detected