Public Types | Public Member Functions | Private Member Functions
ash::Random< T, Global, 32, false, true > Struct Template Reference

Spec for 32-bit float. More...

#include <ash/random.h>

Inheritance diagram for ash::Random< T, Global, 32, false, true >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T value_type
 The type of number generated.

Public Member Functions

 Random ()
 Default constructor.
 Random (T min, T max)
 Constructor for a random number within a set range.
void set_range (T min, T max)
 Change the range of numbers generated.
void unset_range ()
 Remove range restrictions on generated numbers.
operator() () const
 Generate a random number.
operator() (T min, T max) const
 Generate a random number within a range.
 operator T () const
 Cast operator - generate and return a random number.

Private Member Functions

uint32 gen_uint32 () const
uint64 gen_uint64 () const
float gen_float () const
double gen_double () const

Detailed Description

template<typename T, bool Global>
struct ash::Random< T, Global, 32, false, true >

Spec for 32-bit float.

1 1


Member Typedef Documentation

template<typename T , bool Global>
typedef T ash::Random< T, Global, 32, false, true >::value_type

The type of number generated.

Reimplemented from ash::Random< T, Global, S, I, F >.


Constructor & Destructor Documentation

template<typename T , bool Global>
ash::Random< T, Global, 32, false, true >::Random ( ) [inline]

Default constructor.

Reimplemented from ash::Random< T, Global, S, I, F >.

template<typename T , bool Global>
ash::Random< T, Global, 32, false, true >::Random ( min,
max 
) [inline]

Constructor for a random number within a set range.

Parameters:
minThe lower bound of the range.
maxThe upper bound of the range.

Reimplemented from ash::Random< T, Global, S, I, F >.


Member Function Documentation

template<typename T , bool Global>
ash::Random< T, Global, 32, false, true >::operator T ( ) const [inline]

Cast operator - generate and return a random number.

Reimplemented from ash::Random< T, Global, S, I, F >.

template<typename T , bool Global>
T ash::Random< T, Global, 32, false, true >::operator() ( ) const [inline]

Generate a random number.

Reimplemented from ash::Random< T, Global, S, I, F >.

template<typename T , bool Global>
T ash::Random< T, Global, 32, false, true >::operator() ( min,
max 
) const [inline]

Generate a random number within a range.

Parameters:
minThe lower bound of the range.
maxThe upper bound of the range.

Reimplemented from ash::Random< T, Global, S, I, F >.

template<typename T , bool Global>
void ash::Random< T, Global, 32, false, true >::set_range ( min,
max 
) [inline]

Change the range of numbers generated.

Parameters:
minThe lower bound of the range.
maxThe upper bound of the range.

Reimplemented from ash::Random< T, Global, S, I, F >.

template<typename T , bool Global>
void ash::Random< T, Global, 32, false, true >::unset_range ( ) [inline]

Remove range restrictions on generated numbers.

Reimplemented from ash::Random< T, Global, S, I, F >.


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


© 2012   AshTL
Licensed under  AGPLv3
Hosted by  Get AshTL at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated by  doxygen 1.7.4