use more higher-order random bits
parent
ecf45c3c9a
commit
28ba3a553c
|
@ -78,8 +78,8 @@ static inline T clamp(T a, U b, U c)
|
|||
return max(T(b), min(a, T(c)));
|
||||
}
|
||||
|
||||
#define rnd(x) ((int)(randomMT()&0xFFFFFF)%(x))
|
||||
#define rndscale(x) (float((randomMT()&0xFFFFFF)*double(x)/double(0xFFFFFF)))
|
||||
#define rnd(x) ((int)(randomMT()&0x7FFFFFFF)%(x))
|
||||
#define rndscale(x) (float((randomMT()&0x7FFFFFFF)*double(x)/double(0x7FFFFFFF)))
|
||||
#define detrnd(s, x) ((int)(((((uint)(s))*1103515245+12345)>>16)%(x)))
|
||||
|
||||
#define loop(v,m) for(int v = 0; v<int(m); v++)
|
||||
|
|
Loading…
Reference in New Issue