| 109 | } |
| 110 | |
| 111 | Reference<IRandom> deterministicRandom() { |
| 112 | if (!seededRandom) { |
| 113 | seededRandom = Reference<IRandom>(new DeterministicRandom(platform::getRandomSeed(), true)); |
| 114 | } |
| 115 | return seededRandom; |
| 116 | } |
| 117 | |
| 118 | Reference<IRandom> nondeterministicRandom() { |
| 119 | static thread_local Reference<IRandom> random; |