## Public API Reference

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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csRandomVectorGen Class Reference

Random number generator that generates random vector with spherical distribution. More...

`#include <csutil/floatrand.h>`

List of all members.

## Public Member Functions

| csRandomVectorGen (unsigned int seed)
| Initialize the random number generator using given seed.
| csRandomVectorGen ()
| Initialize the random number generator using current time().
csVector3 | Get ()
| Get a random vector within unit sphere.
void | Initialize (unsigned int new_seed)
| Initialize the RNG using the supplied seed value.
void | Initialize ()
| Initialize the RNG using current time() as the seed value.

## Detailed Description

Random number generator that generates random vector with spherical distribution.

Definition at line 91 of file floatrand.h.

## Constructor & Destructor Documentation

csRandomVectorGen::csRandomVectorGen | ( |  | ) | `[inline]`

Initialize the random number generator using current time().

Definition at line 96 of file floatrand.h.

csRandomVectorGen::csRandomVectorGen | ( | unsigned int | seed | ) | `[inline]`

Initialize the random number generator using given seed.

Definition at line 100 of file floatrand.h.

## Member Function Documentation

csVector3 csRandomVectorGen::Get | ( |  | ) | `[inline]`

Get a random vector within unit sphere.

Definition at line 116 of file floatrand.h.

References csVector3::SquaredNorm(), csVector3::x, csVector3::y, and csVector3::z.

void csRandomVectorGen::Initialize | ( | unsigned int | new_seed | ) | `[inline]`

Initialize the RNG using the supplied seed value.

Definition at line 110 of file floatrand.h.

void csRandomVectorGen::Initialize | ( |  | ) | `[inline]`

Initialize the RNG using current time() as the seed value.

Definition at line 105 of file floatrand.h.

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

- csutil/floatrand.h