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

Function random_direction

plugins/siege-engine.cpp:243–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241static Random::MersenneRNG rng;
242
243static void random_direction(float &x, float &y, float &z)
244{
245 float vec[3];
246 rng.unitvector(vec, 3);
247 x = vec[0]; y = vec[1]; z = vec[2];
248}
249
250static double random_error()
251{

Callers 1

doLaunchContentsMethod · 0.85

Calls 1

unitvectorMethod · 0.80

Tested by

no test coverage detected