+ 4
How does a random function works?
I was thinking how does a library random function works .can anyone tell me how it works
10 Answers
0
Pseudorandom (predictable):
Takes a number from a seed (very long number), does math to it, returns it.
Other:
If you aren't looking too close, the amount of radiation is random. There is always a bit radiation. Take that number, do math to it and return it.
For more explanation: Try Google.
+ 1
See my code here.. perhaps this could help you.. This is in Java..
Random rand = new Random();
int randomNum = rand.nextInt();
Here, randomNum is our any random number. You can try this on the code playground.
+ 1
I was not asking its function . I am asking how does it works. when you use a function random(). what dos the function do and how can random nos. be generated without the library function
+ 1
I have Seen your answer
+ 1
I think u should give more explanation
+ 1
try later
0
Using time. seconds. milliseconds. And modify. I think. :)
0
See my answer or the documentation of that method of Java.
0
So? Was it not clear enough? Tell me if I should explain it again using other words...
0
I can not post an answer cuz "no Connection"