AuxPort 0.2
Modules for Audio Software Development
Loading...
Searching...
No Matches
AuxPort::FastRandomFloat Class Reference

This class provides an efficient way to generate random float values. More...

#include <AuxUtility.h>

Public Member Functions

 FastRandomFloat ()
 Default constructor. This initializes the class with a random seed value of 1.
 
 FastRandomFloat (const int &randomSeed)
 This initialized the class with the given random seed value. T.
 
 FastRandomFloat (const FastRandomFloat &random)=default
 
float getRandomFloat ()
 Returns a random float value between -1 and 1.
 
float getRandomFloat (float start, float end)
 Returns a random float value in the range [start, end].
 

Detailed Description

This class provides an efficient way to generate random float values.

Definition at line 422 of file AuxUtility.h.

Constructor & Destructor Documentation

◆ FastRandomFloat() [1/2]

AuxPort::FastRandomFloat::FastRandomFloat ( )

Default constructor. This initializes the class with a random seed value of 1.

Definition at line 94 of file AuxUtility.cpp.

◆ FastRandomFloat() [2/2]

AuxPort::FastRandomFloat::FastRandomFloat ( const int & randomSeed)

This initialized the class with the given random seed value. T.

Note
The given randomSeed should be non-zero.

Definition at line 99 of file AuxUtility.cpp.

Member Function Documentation

◆ getRandomFloat() [1/2]

float AuxPort::FastRandomFloat::getRandomFloat ( )

Returns a random float value between -1 and 1.

Definition at line 105 of file AuxUtility.cpp.

◆ getRandomFloat() [2/2]

float AuxPort::FastRandomFloat::getRandomFloat ( float start,
float end )

Returns a random float value in the range [start, end].

Definition at line 111 of file AuxUtility.cpp.


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