Changeset 3192 for code/branches/pch/src/util/Math.h
- Timestamp:
- Jun 18, 2009, 10:00:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/src/util/Math.h
r3163 r3192 229 229 inline float rnd() 230 230 { 231 return rand() / (RAND_MAX + 1.0 );231 return rand() / (RAND_MAX + 1.0f); 232 232 } 233 233 … … 256 256 inline float rndsgn() 257 257 { 258 return ((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0258 return static_cast<float>((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0 259 259 } 260 260
Note: See TracChangeset
for help on using the changeset viewer.