Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
t_rng16 Class Reference

Public Member Functions

 t_rng16 ()
 
signed long get ()
 

Detailed Description

Definition at line 95 of file softvolume.cpp.

Constructor & Destructor Documentation

t_rng16::t_rng16 ( )
inline

Definition at line 97 of file softvolume.cpp.

References i, and RNG_COUNT.

97  : t_rng16() : pos( 0 )
98  {
99  for (int i = 0; i < RNG_COUNT; i++)
100  _data[i] = (rand()&0xFFFF)-0x8000;
101  } //NOTE: It would be a good idea to perform a highpass - perhaps later

Member Function Documentation

signed long t_rng16::get ( )
inline

Definition at line 103 of file softvolume.cpp.

References RNG_MASK.

Referenced by mpySC8F16(), mpySS16F16(), mpyUC8F16(), and mpyUS16F16().

104  {
105  return _data[pos];
106 
107  pos = (pos+1)&RNG_MASK;
108  }

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