MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / nextLcg

Function nextLcg

source/MRTest/MRZipCompressTests.cpp:26–30  ·  view source on GitHub ↗

Simple LCG used to produce deterministic pseudo-random bytes. Keeps the test reproducible across runs and platforms while avoiding trivially-compressible input (an all-zeros buffer would make deflate look unrealistically good).

Source from the content-addressed store, hash-verified

24// trivially-compressible input (an all-zeros buffer would make deflate
25// look unrealistically good).
26inline uint64_t nextLcg( uint64_t & state )
27{
28 state = state * 6364136223846793005ULL + 1442695040888963407ULL;
29 return state;
30}
31
32} // namespace
33

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected