Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Geo::SimpleRNG

The 'super-duper' random number generator with shuffle (an LCG).

Cheap and a good LCG, but will still perform poorly with some modulos.

Functions

NameDescription
operator()()

Gets the next random number.

SimpleRNG(u32)

Creates a SimpleRNG with the given seed.


Anchor
aebc6823ba5e87008944464824a2fb9cb
aebc6823ba5e87008944464824a2fb9cb

u32 Geo::SimpleRNG::operator()

...

public: u32 operator()()

...

Gets the next random number.


Anchor
a3e1e6cf7331e28439265360a060a57f3
a3e1e6cf7331e28439265360a060a57f3

Geo::SimpleRNG::SimpleRNG

...

public: SimpleRNG
(
    u32 seed
)

...

Creates a SimpleRNG with the given seed.