Classes | Functions

Rand.h File Reference

[Internal] Random number generator More...

#include "Export.h"
Include dependency graph for Rand.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RakNetRandom

Functions

void RAK_DLL_EXPORT seedMT (unsigned int seed)
unsigned int RAK_DLL_EXPORT reloadMT (void)
unsigned int RAK_DLL_EXPORT randomMT (void)
float RAK_DLL_EXPORT frandomMT (void)
void RAK_DLL_EXPORT fillBufferMT (void *buffer, unsigned int bytes)

Detailed Description

[Internal] Random number generator

This file is part of RakNet Copyright 2003 Jenkins Software LLC

Usage of RakNet is subject to the appropriate license agreement.

Definition in file Rand.h.


Function Documentation

void RAK_DLL_EXPORT fillBufferMT ( void *  buffer,
unsigned int  bytes 
)

Randomizes a buffer

Note:
not threadSafe, use an instance of RakNetRandom if necessary per thread

Definition at line 88 of file Rand.cpp.

Here is the call graph for this function:

float RAK_DLL_EXPORT frandomMT ( void   ) 

Gets a random float

Note:
not threadSafe, use an instance of RakNetRandom if necessary per thread
Returns:
0 to 1.0f, inclusive

Definition at line 84 of file Rand.cpp.

Here is the call graph for this function:

unsigned int RAK_DLL_EXPORT randomMT ( void   ) 

Gets a random unsigned int

Note:
not threadSafe, use an instance of RakNetRandom if necessary per thread
Returns:
an integer random value.

Definition at line 80 of file Rand.cpp.

Here is the call graph for this function:

unsigned int RAK_DLL_EXPORT reloadMT ( void   ) 

Definition at line 76 of file Rand.cpp.

Here is the call graph for this function:

void RAK_DLL_EXPORT seedMT ( unsigned int  seed  ) 

Initialise seed for Random Generator

Note:
not threadSafe, use an instance of RakNetRandom if necessary per thread
Parameters:
[in] seed The seed value for the random number generator.

Definition at line 72 of file Rand.cpp.

Here is the call graph for this function: