# Randomizer

### Methods

#### (inner) getHexDigit(num) → {string}

Get a hexadecimal representation of a single digit.

##### Parameters:

Name | Type | Description
--- | --- | ---
`num` | number | Digit to be converted to hexadecimal.

Source:
  - graphics/randomizer.js, line 47

##### Returns:

Hexadecimal representation of `num`.

Type
  string

#### (inner) nextBoolean(probabilityTrue) → {boolean}

Generate a random boolean via fair probability coin toss. If `probabilityTrue` is supplied, the coin toss is skewed by that value.

##### Parameters:

Name | Type | Description
--- | --- | ---
`probabilityTrue` | number | Skewed probability of true.

Source:
  - graphics/randomizer.js, line 97

##### Returns:

Result of coin flip skewed toward `probabilityTrue`.

Type
  boolean

#### (inner) nextColor() → {string}

Generate a random hexadecimal color code of the format #RRGGBB.

Source:
  - graphics/randomizer.js, line 84

##### Returns:

Hexadecimal representation of random color.

Type
  string

#### (inner) nextFloat(low, high) → {number}

Get a random float between low to high, inclusive. If only one parameter is given, a random float from (0, low-1) inclusive.

##### Parameters:

Name | Type | Description
--- | --- | ---
`low` | number | Lower bound on range of random int.
`high` | number | Upper bound on range of random int.

Source:
  - graphics/randomizer.js, line 34

##### Returns:

Random number between low and high, inclusive.

Type
  number

#### (inner) nextHex() → {string}

Generates a random number in range (0,255) in hexadecimal.

Source:
  - graphics/randomizer.js, line 75

##### Returns:

Random number in hexadecimal form.

Type
  string

#### (inner) nextInt(low, high) → {number}

Get a random integer between low to high, inclusive. If only one parameter is given, a random integer from (0, low-1) inclusive.

##### Parameters:

Name | Type | Description
--- | --- | ---
`low` | number | Lower bound on range of random int.
`high` | number | Upper bound on range of random int.

Source:
  - graphics/randomizer.js, line 15

##### Returns:

Random number between low and high, inclusive.

Type
  number

#### (inner) toHex(val) → {string}

Convert a number to hexadecimal.

##### Parameters:

Name | Type | Description
--- | --- | ---
`val` | number | Number to convert to hexadecimal.

Source:
  - graphics/randomizer.js, line 65

##### Returns:

Hexadecimal equivalent of the number.

Type
  string