Flutter Engine
The Flutter Engine
|
#include <SkRandom.h>
Public Member Functions | |
SkRandom () | |
SkRandom (uint32_t seed) | |
SkRandom (const SkRandom &rand) | |
SkRandom & | operator= (const SkRandom &rand) |
uint32_t | nextU () |
int32_t | nextS () |
float | nextF () |
float | nextRangeF (float min, float max) |
uint32_t | nextBits (unsigned bitCount) |
uint32_t | nextRangeU (uint32_t min, uint32_t max) |
uint32_t | nextULessThan (uint32_t count) |
SkScalar | nextUScalar1 () |
SkScalar | nextRangeScalar (SkScalar min, SkScalar max) |
SkScalar | nextSScalar1 () |
bool | nextBool () |
bool | nextBiasedBool (SkScalar fractionTrue) |
void | setSeed (uint32_t seed) |
Utility class that implements pseudo random 32bit numbers using Marsaglia's multiply-with-carry "mother of all" algorithm. Unlike rand(), this class holds its own state, so that multiple instances can be used with no side-effects.
Has a large period and all bits are well-randomized.
Definition at line 27 of file SkRandom.h.
|
inline |
Definition at line 29 of file SkRandom.h.
|
inline |
Definition at line 30 of file SkRandom.h.
|
inline |
Definition at line 31 of file SkRandom.h.
|
inline |
A biased version of nextBool().
Definition at line 121 of file SkRandom.h.
|
inline |
Return the next pseudo random number, as an unsigned value of at most bitCount bits.
bitCount | The maximum number of bits to be returned |
Definition at line 72 of file SkRandom.h.
|
inline |
|
inline |
Returns value [0...1) as an IEEE float
Definition at line 55 of file SkRandom.h.
|
inline |
Return the next pseudo random number expressed as a SkScalar in the range [min..max).
Definition at line 106 of file SkRandom.h.
|
inline |
Return the next pseudo random unsigned number, mapped to lie within [min, max] inclusive.
Definition at line 80 of file SkRandom.h.
|
inline |
Return the next pseudo random number as a signed 32bit value.
Definition at line 50 of file SkRandom.h.
|
inline |
Return the next pseudo random number expressed as a SkScalar in the range [-SK_Scalar1..SK_Scalar1).
Definition at line 113 of file SkRandom.h.
|
inline |
Return the next pseudo random number as an unsigned 32bit value.
Definition at line 42 of file SkRandom.h.
|
inline |
Return the next pseudo random unsigned number, mapped to lie within [0, count).
Definition at line 93 of file SkRandom.h.
|
inline |
Return the next pseudo random number expressed as a SkScalar in the range [0..SK_Scalar1).
Definition at line 101 of file SkRandom.h.
Definition at line 33 of file SkRandom.h.
|
inline |