Namespace SMART.helpers.randFns
Defined in: randFuncs.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
random-related helper fns
|
| Method Attributes | Method Name and Description |
|---|---|
| <inner> |
Alea(data)
From http://baagoe.com/en/RandomMusings/javascript/
Johannes Baagøe |
| <static> |
SMART.helpers.randFns.AleaTester(seed)
|
| <static> |
SMART.helpers.randFns.getSeed()
|
| <inner> |
Mash(data)
From http://baagoe.com/en/RandomMusings/javascript/
Johannes Baagøe Mash.mash() is used to init Alea() |
| <static> |
SMART.helpers.randFns.randOccRng(min, max)
|
| <static> |
SMART.helpers.randFns.random()
|
| <static> |
SMART.helpers.randFns.randRange(min, max)
|
| <static> |
SMART.helpers.randFns.randRangeInt(min, max)
|
| <static> |
SMART.helpers.randFns.seed(sd)
|
| <static> |
SMART.helpers.randFns.seedWithTime()
|
| <static> |
SMART.helpers.randFns.sphRand(r)
|
| <static> |
SMART.helpers.randFns.x(none)
simple tester :)
|
Method Detail
<inner>
{func}
Alea(data)
From http://baagoe.com/en/RandomMusings/javascript/
Johannes Baagøe, 2010
Johannes Baagøe
- Parameters:
- {any} data
- seed value [to pass to Mash.mash()]
- Returns:
- a random number gen *function*
<static>
SMART.helpers.randFns.AleaTester(seed)
- Parameters:
- seed
<static>
SMART.helpers.randFns.getSeed()
<inner>
{int}
Mash(data)
From http://baagoe.com/en/RandomMusings/javascript/
Johannes Baagøe, 2010
Mash.mash() is used to init Alea()
Johannes Baagøe
Mash.mash() is used to init Alea()
- Parameters:
- {any} data
- seed value
- Returns:
- a seed for Alea()
<static>
SMART.helpers.randFns.randOccRng(min, max)
- Parameters:
- min
- max
<static>
SMART.helpers.randFns.random()
<static>
SMART.helpers.randFns.randRange(min, max)
- Parameters:
- min
- max
<static>
SMART.helpers.randFns.randRangeInt(min, max)
- Parameters:
- min
- max
<static>
SMART.helpers.randFns.seed(sd)
- Parameters:
- sd
<static>
SMART.helpers.randFns.seedWithTime()
<static>
SMART.helpers.randFns.sphRand(r)
- Parameters:
- r
<static>
{none}
SMART.helpers.randFns.x(none)
simple tester :)
- Parameters:
- none
- Returns:
- console.log()