Changeset 843
- Timestamp:
- 12/08/18 05:35:57 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/random.h
r324 r843 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-201 5Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2018 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 5 #ifdef _MSC_VER 6 #define NOMINMAX //we don't want Windows headers (minwindef.h) to define min() and max() as macros 7 #undef min //for some reason, NOMINMAX did not work so we have to #undef anyway 8 #undef max 9 #endif 4 10 5 11 #include "nonstd.h" //LONGLONG … … 108 114 } 109 115 116 //UniformRandomBitGenerator 117 typedef unsigned int result_type; 118 static unsigned int min() {return 0;} 119 static unsigned int max() {return MAXVALUE;} 120 inline unsigned int operator()() {return getUint32();} 121 110 122 inline double getDouble() // [0,1) 111 123 {
Note: See TracChangeset
for help on using the changeset viewer.