Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::SimpleLcgRandom Class Reference

#include <Random.h>

Public Member Functions

 SimpleLcgRandom (u64 seed=1234)
 
void SetSeed (u64 seed)
 
unsigned int GetRandom ()
 
u64 Getu64Random ()
 
float GetRandomFloat ()
 

Detailed Description

A very simple and fast LCG random number generator, useful if you need a fast pseudo-random sequence and don't really care about the quality of the sequence. Based on the java Random class, since it's decent quality for a LCG, e.g. avoids cycles in the lower bits. See http://download.oracle.com/javase/6/docs/api/java/util/Random.html for details, also a good reference for some subtle issues.


The documentation for this class was generated from the following file: