8#ifndef SkRandom_DEFINED
9#define SkRandom_DEFINED
43 fK = kKMul*(fK & 0xffff) + (fK >> 16);
44 fJ = kJMul*(fJ & 0xffff) + (fJ >> 16);
45 return (((fK << 16) | (fK >> 16)) + fJ);
56 uint32_t floatint = 0x3f800000 | (this->
nextU() >> 9);
73 SkASSERT(bitCount > 0 && bitCount <= 32);
74 return this->
nextU() >> (32 - bitCount);
82 uint32_t range =
max -
min + 1;
86 return min + this->
nextU() % range;
122 SkASSERT(fractionTrue >= 0 && fractionTrue <= 1);
134 void init(uint32_t seed) {
145 static uint32_t NextLCG(uint32_t seed) {
return kMul*seed + kAdd; }
#define SkFixedToScalar(x)
static float SkBits2Float(uint32_t bits)
SkRandom(const SkRandom &rand)
SkRandom & operator=(const SkRandom &rand)
SkScalar nextRangeScalar(SkScalar min, SkScalar max)
uint32_t nextULessThan(uint32_t count)
float nextRangeF(float min, float max)
bool nextBiasedBool(SkScalar fractionTrue)
void setSeed(uint32_t seed)
uint32_t nextRangeU(uint32_t min, uint32_t max)
uint32_t nextBits(unsigned bitCount)
static float max(float r, float g, float b)
static float min(float r, float g, float b)