CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
lcg.h File Reference

Simple linear congruential pseudo-random number generator. More...

#include <cx/cx.h>

Go to the source code of this file.

Macros

#define LCG_MAX   (0x7ffffffe)
 

Functions

int32 lcgRandom (uint32 *state)
 

Detailed Description

Simple linear congruential pseudo-random number generator.

Basic LCG implementation for situations where simplicity and minimal state are more important than statistical quality. For most applications, prefer the PCG generator which offers superior quality with comparable performance.

Definition in file lcg.h.