MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / rndf

Function rndf

rEFIt_UEFI/libeg/FloatLib.cpp:369–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367
368static UINT32 seed = 12345;
369float rndf() //expected 0..1
370{
371// UINT16 Rand = 0;
372// AsmRdRand16(&Rand); //it's a pity panic
373// return (float)Rand / 65536.f;
374 seed = seed * 214013 + 2531011;
375 float x = (float)seed / 4294967296.0f;
376 return x;
377}
378
379int dither(float x, int level)
380{

Callers 1

ditherFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected