GLUS
Functions
glus_random.h File Reference

Go to the source code of this file.

Functions

GLUSAPI GLUSvoid GLUSAPIENTRY glusRandomSetSeed (const GLUSuint seed)
 Initializes the random generator. More...
 
GLUSAPI GLUSfloat GLUSAPIENTRY glusRandomUniformf (const GLUSfloat start, const GLUSfloat end)
 Returns a uniform distributed random floating point value in the given range. More...
 
GLUSAPI GLUSfloat GLUSAPIENTRY glusRandomNormalf (const GLUSfloat mean, const GLUSfloat standardDeviation)
 Returns a normal distributed random floating point value. More...
 
GLUSAPI GLUSboolean GLUSAPIENTRY glusRandomHammersleyf (GLUSfloat result[2], const GLUSuint sample, const GLUSubyte m)
 Samples two floating point values from a Hammersley point set. More...
 

Function Documentation

GLUSAPI GLUSboolean GLUSAPIENTRY glusRandomHammersleyf ( GLUSfloat  result[2],
const GLUSuint  sample,
const GLUSubyte  m 
)

Samples two floating point values from a Hammersley point set.

Parameters
resultThe resulting random values.
sampleThe sample to take. Has to be in the range 0 <= sample < 2^m.
mOrder m, which allows 2^m samples. Has to be in the range 0 < m <= 32.
Returns
GLUS_TRUE, if sampling was successful.
GLUSAPI GLUSfloat GLUSAPIENTRY glusRandomNormalf ( const GLUSfloat  mean,
const GLUSfloat  standardDeviation 
)

Returns a normal distributed random floating point value.

Parameters
meanMean.
standardDeviationStandard deviation.
Returns
The random value.
GLUSAPI GLUSvoid GLUSAPIENTRY glusRandomSetSeed ( const GLUSuint  seed)

Initializes the random generator.

Parameters
seedNumber for initializing the pseudo-random number generator.
GLUSAPI GLUSfloat GLUSAPIENTRY glusRandomUniformf ( const GLUSfloat  start,
const GLUSfloat  end 
)

Returns a uniform distributed random floating point value in the given range.

Parameters
startSmallest possible generated value (inclusive).
endLargest possible generated value (inclusive).
Returns
The random value.