Rhino C++ API  6.14
Public Member Functions | List of all members
ON_RandomNumberGenerator Class Reference

#include <opennurbs_rand.h>

Public Member Functions

 ON_RandomNumberGenerator ()
 
double RandomDouble ()
 
double RandomDouble (double t0, double t1)
 
ON__UINT32 RandomNumber ()
 
void RandomPermutation (void *base, size_t nel, size_t sizeof_element)
 
void Seed (ON__UINT32 s)
 
void Seed ()
 

Constructor & Destructor Documentation

◆ ON_RandomNumberGenerator()

ON_RandomNumberGenerator::ON_RandomNumberGenerator ( )

Member Function Documentation

◆ RandomDouble() [1/2]

double ON_RandomNumberGenerator::RandomDouble ( )

Returns: double in the interval [0.0 and 1.0]

◆ RandomDouble() [2/2]

double ON_RandomNumberGenerator::RandomDouble ( double  t0,
double  t1 
)

Returns: double in the interval [t0,t1]

◆ RandomNumber()

ON__UINT32 ON_RandomNumberGenerator::RandomNumber ( )

Returns: 32 bit unsigned random number [0,0xFFFFFFFF] [0,4294967295]

◆ RandomPermutation()

void ON_RandomNumberGenerator::RandomPermutation ( void *  base,
size_t  nel,
size_t  sizeof_element 
)

Description: Perform a random permuation on an array. Parameters: base - [in/out] Array of element to permute nel - [in] number of elements in the array. sizeof_element size of an element in bytes.

◆ Seed() [1/2]

void ON_RandomNumberGenerator::Seed ( ON__UINT32  s)

Description: Seed the random number generator. Parameters: s - [in]

◆ Seed() [2/2]

void ON_RandomNumberGenerator::Seed ( )

Description: Seed the random number generator in a way that cannot be reproduced.