Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
1
unsigned long int rand_next = 1;
2
3
unsigned int rand()
4
{
5
rand_next = rand_next * 1103515245 + 12345;
6
return ((unsigned int)(rand_next / 65536) % 32768);
7
}
8
9
int floor(int num) {
10
int x = (int)num;
Callers
4
main
Function · 0.85
Generate
Method · 0.85
main
Function · 0.85
Read
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected