Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LemonOSProject/LemonOS
/ snakeRand
Function
snakeRand
Applications/Snake/main.cpp:34–38 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
32
unsigned long int rand_next = 1;
33
34
int snakeRand()
35
{
36
rand_next = rand_next * 1103515245 + 12345;
37
return ((int)(rand_next / 65536) % 32768);
38
}
39
40
void Wait(){
41
timespec nTimer;
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected