- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Namespace List
- Namespace Members

# FMRandom Namespace Reference

Contains pseudo-random number generation functions. More...

## Functions
FCOLLADA_EXPORT void | Seed (uint32 seed)
| Seeds the pseudo-random number generator.
FCOLLADA_EXPORT uint32 | GetUInt32 ()
| Retrieves one random unsigned integer.
uint32 | GetUInt32 (uint32 rangeEnd)
| Retrieves one random unsigned integer within a given range.
uint32 | GetUInt32 (uint32 rangeStart, uint32 rangeEnd)
| Retrieves one random unsigned integer within a given range.
bool | GetBoolean ()
| Retrieves one random boolean value.
FCOLLADA_EXPORT int32 | GetInt32 ()
| Retrieves one random signed integer.
int32 | GetInt32 (int32 rangeStart, int32 rangeEnd)
| Retrieves one random signed integer.
FCOLLADA_EXPORT float | GetFloat ()
| Retrieves one random floating-point value.
float | GetFloat (float rangeEnd)
| Retrieves one random floating-point value within a given range.
float | GetFloat (float rangeStart, float rangeEnd)
| Retrieves one random floating-point value within a given range.

## Detailed Description

Contains pseudo-random number generation functions.

## Function Documentation

bool FMRandom::GetBoolean | ( |  | ) | `[inline]`

| Retrieves one random boolean value. There should be equal probability that you get true or false values. Returns: A random boolean.

float FMRandom::GetFloat | ( | float | rangeStart,
|  | float | rangeEnd
| ) | `[inline]`

  | Retrieves one random floating-point value within a given range. The generated values will be in the range [rangeStart, rangeEnd]. Parameters:
  | rangeStart | The start of the wanted range.
  | rangeEnd | The end of the wanted range.
Returns: A random floating-point value.

float FMRandom::GetFloat | ( | float | rangeEnd | ) | `[inline]`

  | Retrieves one random floating-point value within a given range. The generated values will be in the range [0, rangeEnd]. Parameters:
  | rangeEnd | The end of the wanted range.
Returns: A random floating-point value.

FCOLLADA_EXPORT float FMRandom::GetFloat | ( |  | ) |

| Retrieves one random floating-point value. The expected valid range is [0,1]. Returns: A random floating-point value.

int32 FMRandom::GetInt32 | ( | int32 | rangeStart,
|  | int32 | rangeEnd
| ) | `[inline]`

  | Retrieves one random signed integer. The generated values will be in the range: [rangeStart, rangeEnd[. Parameters:
  | rangeStart | The start of the wanted range.
  | rangeEnd | The end of the wanted range.
Returns: A random signed integer.

FCOLLADA_EXPORT int32 FMRandom::GetInt32 | ( |  | ) |

| Retrieves one random signed integer. The expected valid range is [-0x3FFF,0x4000]. Returns: A random signed integer.

uint32 FMRandom::GetUInt32 | ( | uint32 | rangeStart,
|  | uint32 | rangeEnd
| ) | `[inline]`

  | Retrieves one random unsigned integer within a given range. The generated values will be in the range: [rangeStart, rangeEnd[. Parameters:
  | rangeStart | The start of the wanted range.
  | rangeEnd | The end of the wanted range.
Returns: A random unsigned integer.

uint32 FMRandom::GetUInt32 | ( | uint32 | rangeEnd | ) | `[inline]`

  | Retrieves one random unsigned integer within a given range. The generated values will be in the range: [0, rangeEnd[. Parameters:
  | rangeEnd | The end of the wanted range.
Returns: A random unsigned integer.

FCOLLADA_EXPORT uint32 FMRandom::GetUInt32 | ( |  | ) |

| Retrieves one random unsigned integer. The expected valid range is [0,0x7FFF]. Returns: A random unsigned integer.

FCOLLADA_EXPORT void FMRandom::Seed | ( | uint32 | seed | ) |

  | Seeds the pseudo-random number generator. Parameters:
  | seed | The new pseudo-random number generator seed.