Changeset 39516 in webkit for trunk/JavaScriptCore/wtf/RandomNumber.cpp
- Timestamp:
- Dec 29, 2008, 11:54:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/RandomNumber.cpp
r39515 r39516 30 30 #include "RandomNumberSeed.h" 31 31 32 #include <limits> 32 33 #include <limits.h> 33 34 #include <stdint.h> … … 52 53 return static_cast<double>(u) / (static_cast<double>(UINT_MAX) + 1.0); 53 54 #elif PLATFORM(DARWIN) 54 return static_cast<double>(arc4random()) / (static_cast<double>( UINT32_MAX) + 1.0);55 return static_cast<double>(arc4random()) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0); 55 56 #else 56 57 return static_cast<double>(rand()) / (static_cast<double>(RAND_MAX) + 1.0);
Note:
See TracChangeset
for help on using the changeset viewer.