MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / rand

Function rand

Kernel/src/math.cpp:3–7  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1unsigned long int rand_next = 1;
2
3unsigned int rand()
4{
5 rand_next = rand_next * 1103515245 + 12345;
6 return ((unsigned int)(rand_next / 65536) % 32768);
7}
8
9int floor(int num) {
10 int x = (int)num;

Callers 4

mainFunction · 0.85
GenerateMethod · 0.85
mainFunction · 0.85
ReadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected