Changeset 247 for cpp/frams/util/rndutil.cpp
- Timestamp:
- 11/07/14 17:51:01 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/rndutil.cpp
r197 r247 5 5 #include "rndutil.h" 6 6 #include <common/nonstd_math.h> 7 #include <cstdint> 7 8 #include <stdlib.h> 8 9 9 10 unsigned short pseudornd(short x) 10 11 { 11 static longseed = 0;12 longy;12 static int32_t seed = 0; 13 int32_t y; 13 14 if (x <= 0) { seed = -x; return 0; } 14 15 seed = (y = (3677 * seed + 3680) & 0x7fffffff) - 1;
Note: See TracChangeset
for help on using the changeset viewer.