MCPcopy Create free account
hub / github.com/SimHacker/micropolis / simRandom

Method simRandom

MicropolisCore/src/MicropolisEngine/src/random.cpp:88–92  ·  view source on GitHub ↗

* Draw a random number (internal function). * @todo Use Wolfram's fast cellular automata pseudo random number generator. * @return Unsigned 16 bit random number. */

Source from the content-addressed store, hash-verified

86 * @return Unsigned 16 bit random number.
87 */
88int Micropolis::simRandom()
89{
90 nextRandom = nextRandom * 1103515245 + 12345;
91 return (nextRandom & 0xffff00) >> 8;
92}
93
94
95/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected