Changeset 1302 for cpp/common
- Timestamp:
- 04/25/24 21:59:54 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/nonstd_math.h
r1298 r1302 25 25 inline double rndDouble(double limit_exclusive) { return rndGetInstance().getDouble() * limit_exclusive; } 26 26 inline unsigned int rndUint(unsigned int limit_exclusive) { return (unsigned int)(rndGetInstance().getDouble() * limit_exclusive); } //returns random from 0..limit_exclusive-1 27 #ifndef __BORLANDC__ //for embarcadero 11u3, unsigned int and size_t are duplicates 27 28 inline unsigned int rndUint(size_t limit_exclusive) {return rndUint((unsigned int)limit_exclusive);} //just an overload with size_t argument 29 #endif 28 30 unsigned int rndUint(int limit_exclusive); //just an overload with int argument 29 31 inline void rndSetSeed(unsigned int seed) { rndGetInstance().setSeed(seed); }
Note: See TracChangeset
for help on using the changeset viewer.