Constructor Summary
Public Constructor | ||
public |
constructor(seed: number) Initializes with the seed. |
Method Summary
Public Methods | ||
public |
Generates a random boolean value accounting for the bias and exponent. |
|
public |
Generates a random color string. |
|
public |
Generates a string of random letters. |
|
public |
Generates next random number in sequence. |
|
public |
Generates a random float in the specified range. |
|
public |
Generates a random integer in the specified range. |
|
public |
Selects a random element in the supplied collection. |
Public Constructors
Public Methods
public choice(bias: number, exp: number): boolean source
Generates a random boolean value accounting for the bias and exponent.
public letters(n: number): string source
Generates a string of random letters.
Params:
Name | Type | Attribute | Description |
n | number | Length of string |
public next(): number source
Generates next random number in sequence. This method uses the sine function and some to get the next random number.
public nextFloat(s: number, e: number): number source
Generates a random float in the specified range.