16 #include "internal/mozzi_rand_p.h"
41 inline void randSeed(uint32_t seed) { MozziPrivate::randSeed(seed); };
66 inline void xorshiftSeed(uint32_t seed) { randSeed(seed); };
76 return (int8_t) ((((
int) (lowByte(xorshift96()))) * (maxval-minval))>>8) + minval;
86 return (int8_t) ((((
int) (lowByte(xorshift96()))) * maxval)>>8);
97 return (uint8_t) ((((
unsigned int) (lowByte(xorshift96()))) * (maxval-minval))>>8) + minval;
107 return (uint8_t) ((((
unsigned int) (lowByte(xorshift96()))) * maxval)>>8);
118 inline int rand(
int minval,
int maxval)
120 return (
int) ((((
xorshift96() & 0xFFFF) * (maxval-minval))>>16) + minval);
130 inline int rand(
int maxval)
141 inline unsigned int rand(
unsigned int minval,
unsigned int maxval)
143 return (
unsigned int) ((((
xorshift96() & 0xFFFF) * (maxval-minval))>>16) + minval);
153 inline unsigned int rand(
unsigned int maxval)
155 return (
unsigned int) (((
xorshift96() & 0xFFFF) * maxval)>>16);
164 return lowByte(xorshift96())>>1;