MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / Marsaglia

Function Marsaglia

libraries/randomHelpers/randomHelpers.cpp:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36
37uint32_t Marsaglia()
38{
39 m_z = 36969L * (m_z & 65535L) + (m_z >> 16);
40 m_w = 18000L * (m_w & 65535L) + (m_w >> 16);
41 return (m_z << 16) + m_w; /* 32-bit result */
42}
43
44
45bool seedMarsaglia(uint32_t a, uint32_t b)

Callers 1

getRandom32Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected