Euphoria
eu::Random Struct Reference

WEL512 Random Number Generator. More...

#include <random.h>

Public Member Functions

 Random (U32 seed=generate_time_seed())
 
U32 get_next_u32 ()
 
U64 get_next_u64 ()
 
float get_next_float01 ()
 
bool get_next_bool ()
 
int get_next_sign ()
 

Static Public Member Functions

static U32 generate_time_seed ()
 

Public Attributes

U32 index
 
U32 state [16]
 

Detailed Description

WEL512 Random Number Generator.

Definition at line 20 of file random.h.

Constructor & Destructor Documentation

◆ Random()

eu::Random::Random ( U32  seed = generate_time_seed())
explicit

Definition at line 44 of file random.cc.

Member Function Documentation

◆ generate_time_seed()

U32 eu::Random::generate_time_seed ( )
static

Definition at line 28 of file random.cc.

◆ get_next_bool()

bool eu::Random::get_next_bool ( )

Definition at line 121 of file random.cc.

◆ get_next_float01()

float eu::Random::get_next_float01 ( )

Definition at line 78 of file random.cc.

◆ get_next_sign()

int eu::Random::get_next_sign ( )

Definition at line 127 of file random.cc.

◆ get_next_u32()

U32 eu::Random::get_next_u32 ( )

Definition at line 54 of file random.cc.

◆ get_next_u64()

U64 eu::Random::get_next_u64 ( )

Definition at line 70 of file random.cc.

Member Data Documentation

◆ index

U32 eu::Random::index

Definition at line 22 of file random.h.

◆ state

U32 eu::Random::state[16]

Definition at line 23 of file random.h.


The documentation for this struct was generated from the following files: