Nebula
Loading...
Searching...
No Matches
Util::RandomNumberTable Class Reference

#include <randomnumbertable.h>

Detailed Description

A table-based random-number generator.

Returns the same random number for a given key.

Static Public Member Functions

static float Rand (IndexT key)
 return a pseudo-random number between 0 and 1
 
static float Rand (IndexT key, float minVal, float maxVal)
 return a pseudo random number between min and max
 

Static Private Attributes

static const SizeT tableSize = 2048
 
static const float randTable [tableSize]
 

Member Function Documentation

◆ Rand() [1/2]

float Util::RandomNumberTable::Rand ( IndexT key)
inlinestatic

return a pseudo-random number between 0 and 1

◆ Rand() [2/2]

float Util::RandomNumberTable::Rand ( IndexT key,
float minVal,
float maxVal )
inlinestatic

return a pseudo random number between min and max

Member Data Documentation

◆ randTable

const float Util::RandomNumberTable::randTable
staticprivate

◆ tableSize

const SizeT Util::RandomNumberTable::tableSize = 2048
staticprivate

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