U++ framework
Do not panic. Ask here before giving up.

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 Go to previous messageGo to previous message
Sender Ghost is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Init a ctrl inside INITBLOCK
Next Topic: problem with new and delete
Goto Forum:
  


Current Time: Thu May 14 13:05:16 GMT+2 2026

Total time taken to generate the page: 0.02825 seconds