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

Method getRandom16Signed

MicropolisCore/src/MicropolisEngine/src/random.cpp:127–136  ·  view source on GitHub ↗

Get signed 16 bit random number. */

Source from the content-addressed store, hash-verified

125
126/** Get signed 16 bit random number. */
127int Micropolis::getRandom16Signed()
128{
129 int i = getRandom16();
130
131 if (i > 0x7fff) {
132 i = 0x7fff - i;
133 }
134
135 return i;
136}
137
138
139/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected