Home » U++ Library support » U++ Core » random functions proposal
Re: random functions proposal [message #35151 is a reply to message #35147] |
Tue, 17 January 2012 12:58 |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
Hello, Mirek.
mirek wrote on Tue, 17 January 2012 11:13 |
BTW, what IS actually missing is double Randomf(); (returning 0 < x < 1)
|
Something like this?
// Returns random value from 0 to 1 - 10^-9 with 10^-9 precision.
double Randomf()
{
static const dword n = 1000000000;
return double(Random(n)) / n;
}
[Updated on: Tue, 17 January 2012 13:01] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 04 18:23:31 CEST 2024
Total time taken to generate the page: 0.03062 seconds
|