#include <opennurbs_rand.h>
◆ ON_RandomNumberGenerator()
ON_RandomNumberGenerator::ON_RandomNumberGenerator |
( |
| ) |
|
◆ RandomDouble() [1/3]
double ON_RandomNumberGenerator::RandomDouble |
( |
| ) |
|
Returns: double in the interval [0.0 and 1.0]
◆ RandomDouble() [2/3]
double ON_RandomNumberGenerator::RandomDouble |
( |
const class ON_Interval & |
range | ) |
|
◆ RandomDouble() [3/3]
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 permutation 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.
◆ RandomSeed()
static ON__UINT32 ON_RandomNumberGenerator::RandomSeed |
( |
| ) |
|
|
static |
◆ RandomSignedInteger()
int ON_RandomNumberGenerator::RandomSignedInteger |
( |
int |
i0, |
|
|
int |
i1 |
|
) |
| |
Parameters: i0 - [in] i1 - [in] Returns: A signed integer in the interval [min(i0,i1), max(i0,i1)], inclusive Example RandomSignedInteger(-2,3) will return -2, -1, 0, 1, 2, or 3.
◆ RandomUnsignedInteger()
unsigned int ON_RandomNumberGenerator::RandomUnsignedInteger |
( |
unsigned int |
i0, |
|
|
unsigned int |
i1 |
|
) |
| |
Parameters: i0 - [in] i1 - [in] Returns: An unsigned integer in the interval [min(i0,i1), max(i0,i1)], inclusive Example RandomUnsignedInteger(3,7) will return 3, 4, 5, 6, or 7.
◆ Seed() [1/2]
void ON_RandomNumberGenerator::Seed |
( |
| ) |
|
Description: Seed the random number generator in a way that cannot be reproduced.
◆ Seed() [2/2]
void ON_RandomNumberGenerator::Seed |
( |
ON__UINT32 |
s | ) |
|
Description: Seed the random number generator. Parameters: s - [in]
◆ TwoGaussians()
void ON_RandomNumberGenerator::TwoGaussians |
( |
double * |
u, |
|
|
double * |
v |
|
) |
| |
Description: Places two Gaussians with mean zero and standard deviation one, generated by a Box-Muller transform, into the doubles pointed to by its arguments. Parameters: u - [out] v - [out] Returns: