Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
PseudoRandom Class Reference

#include <noise.h>

Public Member Functions

 PseudoRandom (s32 seed_=0)
 
void seed (s32 seed)
 
u32 next ()
 
s32 range (s32 min, s32 max)
 
s32 getState () const
 

Static Public Attributes

static const u32 RANDOM_RANGE = 32767
 

Private Attributes

s32 m_next
 

Constructor & Destructor Documentation

◆ PseudoRandom()

PseudoRandom::PseudoRandom ( s32  seed_ = 0)
inline

References seed().

+ Here is the call graph for this function:

Member Function Documentation

◆ getState()

s32 PseudoRandom::getState ( ) const
inline

References m_next.

Referenced by LuaPseudoRandom::l_get_state(), and TestRandom::testPseudoRandom().

+ Here is the caller graph for this function:

◆ next()

u32 PseudoRandom::next ( )
inline

◆ range()

◆ seed()

void PseudoRandom::seed ( s32  seed)
inline

References m_next, and seed().

Referenced by PseudoRandom(), DungeonGen::generate(), and seed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_next

s32 PseudoRandom::m_next
private

Referenced by getState(), next(), and seed().

◆ RANDOM_RANGE

const u32 PseudoRandom::RANDOM_RANGE = 32767
static

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